Loading...

Android Play TabLayout Similar to Google Play Tab Layout

PlayTabLayout is a tab layout very similar to Google Play tab layout. The main feature is that ripple shows in a particular place where user taps.

The current minSDK version is API level 16.

Download


Gradle:
implementation 'com.github.armcha:PlayTabLayout:2.0.0'

Download sample apk

Setup and usage

  1. Add AutoLinkTextView to your layout
     <io.armcha.playtablayout.core.PlayTabLayout
            android:id="@+id/playTabLayout"
            android:layout_width="match_parent"
            android:layout_height="some_dp" />
  1. Add tab colors
playTabLayout.colors = intArrayOf(
                R.color.f,
                R.color.s,
                R.color.t,
                R.color.four)

Note: array must be the same size as your adapter item count

  1. And you can use it like a regular tab layout
viewPager.adapter = TabAdapter(supportFragmentManager)
val tabLayout = playTabLayout.tabLayout
tabLayout.setupWithViewPager(viewPager)

Current limitations:

You can't set
tabMode="scrollable"
and
tabGravity="center"

Download From GitHub

Download Full Project Code From GitHub
android-tabs-examples 4182455618079806749
Home item