Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Whats is the difference between actionbar and tabhost/tabactivity

Quick question, Whats the difference between actionbar and tabhost. I used to use tabhost and add tabs to it.

Then I was asked to use actionbar and reading about it, it seems it is just another way of having tabs. So when would use each? Whats the difference

Thank you

like image 860
Snake Avatar asked Oct 07 '12 19:10

Snake


People also ask

What is TabHost in Android studio?

In Android, TabHost is a Container for tabbed window view. This object holds two children one is set of tab labels that the user clicks to select a specific tab and other is a FrameLayout object that displays the content of that page.

What are the two TabHost children?

TabHost consists of two children of which one is FrameLayout (which is used to show the contents of the activity) and another one is TabWidget.


1 Answers

Pretty simple: ActionBar is the replacement of TabHost since Android 3.0.

Moreover, ActionBar can do more things than TabHost (like logo as a button, spinners, actions buttons…).

Have a look to ActionBar documentation on Android design guidelines.

like image 67
Kyriog Avatar answered Oct 16 '22 00:10

Kyriog