Android BidirectionalViewPager 一个可以横向滑动、竖向滑动的双向滑动ViewPager

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/jspping/article/details/80208394

Android BidirectionalViewPager 一个可以横向滑动、竖向滑动的双向滑动ViewPager

BidirectionalViewPager

BidirectionalViewPager is a viewpager that can slide in both directions.

XML Usage

<engineer.jsp.bidirectional.viewpager.BidirectionalViewPager
    android:id="@+id/bidirectional_viewpager"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:orientation="horizontal" >
</engineer.jsp.bidirectional.viewpager.BidirectionalViewPager>

Java Code Usage

BidirectionalViewPager mBidirectionalViewPager = new BidirectionalViewPager(this);

The Listener Usage

	mBidirectionalViewPager.setOnPageChangeListener(new OnPageChangeListener() {

		@Override
		public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {

		}

		@Override
		public void onPageSelected(int position) {

		}

		@Override
		public void onPageScrollStateChanged(int state) {

		}

	});

Android Eclipse Project URL:

https://github.com/Mr-Jiang/BidirectionalViewPager/tree/master/Eclipse/BidirectionalViewPager

Android Studio Project URL:

https://github.com/Mr-Jiang/BidirectionalViewPager/tree/master/Studio/BidirectionalViewPager

Horizontal slide effect


Vertical slide effect


If you think this project is helpful to you, please give me GitHub Start or Fork to support me to continue to provide better projects!

GitHub URLhttps://github.com/Mr-Jiang/BidirectionalViewPager

阅读更多

没有更多推荐了,返回首页