Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fixed tabs in new material design android

I've searched stackoverflow and google material design documentation quite a lot but can't find a way how to correctly implement simple fixed tabs in the new material design. I am using appcompat v7 library with toolbar which is great but can't seem to find a way to add tabs to it or simply below it as it is shown heretabs from google website

I've found the SlidingTabsBasic class but that does not meet my requirements as I only use 2 tabs, and they don't fill in the whole horizontal space

Could you please point me into right direction on how to implement those (maybe I have only misunderstood how google wants us to use/implement them).

Much appreciated

like image 750
user1071762 Avatar asked Nov 18 '14 18:11

user1071762


People also ask

What is UI tab?

In interface design, a tab is a graphical user interface object that allows multiple documents or panels to be contained within a single window, using tabs as a navigational widget for switching between sets of documents.

What is a tabs bar?

Tabs organize and allow navigation between groups of content that are related and at the same level of hierarchy. The Tab Bar contains the Tab Scroller and Tab components.


2 Answers

Actually google has not released anything, but my custom library uses the style and animation defined in the Material Design guidelines.

Here you can find it, good work!

like image 132
NeoKree Avatar answered Oct 19 '22 00:10

NeoKree


Google has released a Material Design Support Library, which includes a TabLayout to create Material design easier

like image 35
Tomas K Avatar answered Oct 18 '22 23:10

Tomas K