Back to project page ByakuGallery.
The source code is released under:
Apache License
If you think the Android project ByakuGallery listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.diegocarloslima.byakugallery.lib; /*w w w .j a v a 2 s . c o m*/ import android.annotation.SuppressLint; import android.content.Context; import android.support.v4.view.ViewPager; import android.util.AttributeSet; import android.view.View; public class GalleryViewPager extends ViewPager { public GalleryViewPager(Context context) { this(context, null); } public GalleryViewPager(Context context, AttributeSet attrs) { super(context, attrs); } @SuppressLint("NewApi") @Override protected boolean canScroll(View v, boolean checkV, int dx, int x, int y) { if (v instanceof TouchImageView) { return ((TouchImageView) v).canScrollHorizontally(dx); } else { return super.canScroll(v, checkV, dx, x, y); } } }