Comments (3)
Yes, I've looked at the code of PhotoViewAttacher and can confirm that paddings are ignored. Well, it can be fixed quite easy by using imageView.getWidth() - (imageView.getPaddingLeft() + imageView.getPaddingRight())
instead of just imageView.getWidth()
. The same story with imageView.getHeight()
, you should replace it with imageView.getHeight() - (imageView.getPaddingTop() + imageView.getPaddingBottom())
. It's just three methods in the PhotoViewAttacher where you should do this changes: onFling(), checkMatrixBounds(), updateBaseMatrix()
.
Hope this will help you, @chrisbanes. @milek .
from photoview.
Just encountered this too, the fix provided by Ghedeon works nicely.
from photoview.
@laurencedawson @Ghedeon can you put together a pull request against dev branch? Would be nice, if you have the PhotoViewAttacher patched already.
from photoview.
Related Issues (20)
- Error implementing dependency HOT 1
- Not working on Android Studio Bumblebee HOT 3
- Dragging gesture is consumed when used in scrollable composable HOT 5
- Exceptions occur when setZoomable(false) and setScaleType(FIT_XY) are used together HOT 1
- Canvas: trying to draw too large(432000000bytes) bitmap. HOT 1
- Profile
- Way to get location of tap outside view?
- Openharmony application
- Is there a Version Update and Release Plan after 2.3.0 HOT 1
- Picture
- Could not resolve all artifacts HOT 4
- Could not resolve all artifacts - com.github.chrisbanes:PhotoView:2.3.0 HOT 5
- Could not resolve com.github.chrisbanes:PhotoView:2.3.0 HOT 1
- Photo HOT 1
- It seems that the Viewpage that does not support sliding up and down? HOT 1
- Scrolling behavior in ViewPager HOT 1
- Why not Migrate to AndroidX
- 图片放大后 比较模糊 请问如何处理 谢谢 HOT 1
- The picture is blurred after enlarging. How to deal with it HOT 1
- How to use PhotoViewAttacher?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from photoview.