Open jvnn opened 11 years ago
Thank you for report!
I have also tried. It discovered not moving satisfactorily, when ScaleImageView had arranged on ViewPager. ViewPager hook the flick of left and right. So when enlarge an image, Can't scroll left and right.
I'll try looking for a solution. Thank you.
Hi,
The solution is already included in my first message, that code works at least for me. :)
The main change is this line: int r_norm = r - l;
And then using r_norm instead of r for later calculations (except when calling super.setFrame).
EDIT: Oh, I read your comment again, and realised that you also mentioned zooming in and then scrolling. I had to disable swiping on the ViewPager completely so that it doesn't interfere with zooming and panning the image in the ScaleImageView. There is a good piece of code in stackoverflow: http://stackoverflow.com/questions/9650265/how-do-disable-paging-by-swiping-with-finger-in-viewpager-but-still-be-able-to-s
First of all, thanks for the nice widget! There is a problem though when using the ScaleImageView with a ViewPager, weird things happen because the pager feeds unexpected values to the setFrame method. The problems is fixed in the code below.