You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I use setMinimumScaleType(SubsamplingScaleImageView.SCALE_TYPE_START) on a SubsamplingScaleImageView with padding, the image is placed at the very view border, and as soon as it's grabbed it "snaps in place" (moving away from the border) in order to respect the padding area. Then, that grab gesture doesn't work as intended, and you have to let it go and grab it again to resume normal behavior.
If instead of using SCALE_TYPE_START I use SCALE_TYPE_CENTER_CROP and pass new ImageViewState(0, new PointF(0, 0), 0) when loading the image (as suggested in #166), everything works perfectly and padding is observed, just like I would expect when using SCALE_TYPE_START.
PS: I think the issue is somewhere here in fitToBounds:
If I use
setMinimumScaleType(SubsamplingScaleImageView.SCALE_TYPE_START)
on aSubsamplingScaleImageView
with padding, the image is placed at the very view border, and as soon as it's grabbed it "snaps in place" (moving away from the border) in order to respect the padding area. Then, that grab gesture doesn't work as intended, and you have to let it go and grab it again to resume normal behavior.If instead of using
SCALE_TYPE_START
I useSCALE_TYPE_CENTER_CROP
and passnew ImageViewState(0, new PointF(0, 0), 0)
when loading the image (as suggested in #166), everything works perfectly and padding is observed, just like I would expect when usingSCALE_TYPE_START
.PS: I think the issue is somewhere here in
fitToBounds
:subsampling-scale-image-view/library/src/main/java/com/davemorrissey/labs/subscaleview/SubsamplingScaleImageView.java
Lines 1476 to 1478 in ebce8e0
I'd try changing it to:
The text was updated successfully, but these errors were encountered: