- This library is a library for using RecyclerView like ViewPager
- This is a library based on lsjwzh/RecyclerViewPager.
- This lib is using PagerSnapHelper | Android Developers
- This lib is only have the minimum functionality
- Support TabLayout
- Support Vertical and Horizontal orientation.
-
Step 1. Add the JitPack repository to your build file
Add it in your
root build.gradle
at the end of repositories:allprojects { repositories { ... maven { url 'https://jitpack.io' } } }
-
Step 2. Add the dependency
dependencies { implementation 'com.github.pm-coffee:Android-RecyclerPager:0.1.0' }
<com.github.pmcoffee.android.recyclerpager.RecyclerPager
android:id="@+id/recyclerPager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
app:layoutManager="android.support.v7.widget.LinearLayoutManager"
/>
- Required Attribute and Value
android:orientation
horizontal
orvertical
app:layoutManager="android.support.v7.widget.LinearLayoutManager"
TabLayoutSupport.setupWithViewPager(tabLayout, recyclerPager, recyclerPagerAdapter);
- When there is an Item with a vertical RecyclerView inside it is not good enough with CoordinatorLayout. (poor operability)