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

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

发布了97 篇原创文章 · 获赞 285 · 访问量 36万+

猜你喜欢

转载自blog.csdn.net/jspping/article/details/80208394