Skip to content

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.

Notifications You must be signed in to change notification settings

naseemakhtar994/PlayTabLayout

 
 

Repository files navigation

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.


The current minSDK version is API level 16.

Download


Gradle:

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

The library works with support design, so you should add it to your project. Without support design there will be an issue. It will be fixed in upcoming versions.

implementation 'com.android.support:design:26.1.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)

Contact

Pull requests are more than welcome.

License

  PlayTabLayout
  Copyright (c) 2017 Arman Chatikyan (https://github.com/armcha/PlayTabLayout).

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

About

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.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Kotlin 100.0%