Android Play TabLayout Similar to Google Play Tab Layout
http://www.viralandroid.com/2020/02/android-play-tablayout-google-play-tab-layout.html
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.
Download From GitHub
Download Full Project Code From GitHub
The current minSDK version is API level 16.
Download
Gradle:
implementation 'com.github.armcha:PlayTabLayout:2.0.0'
apk
Download sampleSetup and usage
- Add AutoLinkTextView to your layout
<io.armcha.playtablayout.core.PlayTabLayout
android:id="@+id/playTabLayout"
android:layout_width="match_parent"
android:layout_height="some_dp" />
- 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
- 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