Android Open Source - ByakuGallery Gallery View Pager






From Project

Back to project page ByakuGallery.

License

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.

Java Source Code

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);
    }
  }
}




Java Source Code List

com.diegocarloslima.byakugallery.lib.FlingScroller.java
com.diegocarloslima.byakugallery.lib.GalleryViewPager.java
com.diegocarloslima.byakugallery.lib.MathUtils.java
com.diegocarloslima.byakugallery.lib.TileBitmapDrawable.java
com.diegocarloslima.byakugallery.lib.TouchGestureDetector.java
com.diegocarloslima.byakugallery.lib.TouchImageView.java
com.diegocarloslima.byakugallery.sample.GalleryViewPagerSampleActivity.java
com.diegocarloslima.byakugallery.sample.MainActivity.java
com.diegocarloslima.byakugallery.sample.TouchImageViewSampleActivity.java