/ Tabs

A tab layout very similar to Google Play tab layout

A tab layout very similar to Google Play tab layout

PlayTabLayout

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.

witIcon

regular

The current minSDK version is API level 16.

Download


Gradle:

implementation 'com.github.armcha:PlayTabLayout:1.2.4'

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)

GitHub