2

I want to create the following layout - an activity with a viewpager along with a tab that stays that the bottom of the activity to indicate which of the 4 fragments the user is in (and the selected tab gets highlighted by an 'active colour')

enter image description here

I've spent some time looking at various resources online to add this tab.

http://developer.android.com/training/implementing-navigation/lateral.html#tabs - this looked like it would work well until I found out that actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); is deprecated

I looked here however, it is the same solution (i.e. deprecated)

I looked here however, the PagerTitleStrip shows one tab (and partly the adjacent tabs) while I want to see all the tabs (there are no partially hidden tabs as in the picture)

Is there a tutorial that explains how to achieve this? It is one of the most basic UI elements, so I am hoping I am not finding the best solution

Community
  • 1
  • 1
dowjones123
  • 3,695
  • 5
  • 40
  • 83

1 Answers1

0

I was looking for same and I saw this question, here in this answer OP says that

it's against Android Design Guideline since at bottom there are soft/hard buttons like back button home button etc.

http://developer.android.com/design/patterns/pure-android.html

But if you insist on to put them at the bottom, you can implement it like GitHub example consists tabs in bottom, using FragmentTabHost.

https://github.com/rameshkec85/BottomTabsFragmentTabHost

So even I am considering it.

Community
  • 1
  • 1
Darpan
  • 5,623
  • 3
  • 48
  • 80