I have a viewpager with left and right padding for showing the previews of left and right pages of viewpager.
viewPager.setPadding(30,0,30,0);
Did you try putting zoomview beside viewpager in framelayout (not in each page) so it is on top of viewpager.
Try this, it's worked for me using this :https://gist.github.com/atermenji/3781644
public class ImageZoomViewPager extends ViewPager {
public ImageZoomViewPager(Context context) {
super(context);
}
public ImageZoomViewPager(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
protected boolean canScroll(View v, boolean checkV, int dx, int x, int y) {
if (v instanceof ImageViewTouch) {
return ((ImageViewTouch) v).canScroll(dx);
} else {
return super.canScroll(v, checkV, dx, x, y);
}
}}