A DirectionalViewPager(VerticalViewPager + ViewPager) can work in new Support V4.
1.this project is base on JakeWharton/Android-DirectionalViewPager.
2.some code is base on stackoverflow
Do not use DirectionalViewPager.addOnPageChangeListener(),
use DirectionalViewPager.setOnPageChangeListener().
compile 'com.android.support:support-v4:23.1.0'
copy package android.support.v4.view(with file DirectionalViewPager.java ,VerticalViewPagerCompat.java) to your project.
Do not change package name!!!
in xml:
<android.support.v4.view.DirectionalViewPager
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
change orientation
mViewPager.setOrientation(DirectionalViewPager.VERTICAL);
mViewPager.setOrientation(DirectionalViewPager.HORIZONTAL);