Skip to content

pm-coffee/Android-RecyclerPager

Repository files navigation

Android-RecyclerPager

How to import

  • 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'
    }

Usage

XML

    <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 or vertical
    • app:layoutManager="android.support.v7.widget.LinearLayoutManager"

TabLayoutSupport

TabLayoutSupport.setupWithViewPager(tabLayout, recyclerPager, recyclerPagerAdapter);

Known Issues

  • When there is an Item with a vertical RecyclerView inside it is not good enough with CoordinatorLayout. (poor operability)