As far as I know, there are components ViewPager
and ActionBar
can support "tab navigation" mode but they don't have intermediate tab indicator between the tabs, just only positioning below a tab TextView
.
How the Google Play app implemented this feature: POSITIONING linked with transition ?
This example demonstrates how do I create a Tab Layout in android app. Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project. Step 3 − Add the following code to res/layout/activity_main. xml.
It provides a horizontal layout to display tabs on the screen. We can display more screens on a single screen using tabs. We can quickly swipe between the tabs.
Tabs are created using newTab() method of TabLayout class. The title and icon of Tabs are set through setText(int) and setIcon(int) methods of TabListener interface respectively. Tabs of layout are attached over TabLayout using the method addTab(Tab) method.
You can achieve this by implementing android:actionBarTabStyle
using ActionBarSherlock library.
I don't have idea exactly about this, but hope you know Android team has integrated the same pattern in I/O 2013 Android app and it will open sourced soon.
I just came across one library which can fulfill your requirement, check this: https://github.com/astuetz/PagerSlidingTabStrip
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With