Tung Mai Le Tung Mai Le - 1 year ago 98
Android Question

Android, Tabs without Actionbar

This question has been asked (for example, here Using ViewPager with Tabs without actionBar), however the answer there doesn't work. There's some links to Swipey but unfortunately the link is broken too.

The example from Android site EffectiveNavigation uses Actionbar to host the tab fragment, so obviously if I set a .NoActionBar theme, then there's no host. Any different way? Thanks.

Update screenshot of what I want to create, at the top, there's no actionbar.
enter image description here

Update 2 this is from the google example, there's an actionbar on top (titled "Effective navigation), which I want to get rid of

enter image description here

Answer Source

Solution of your problem is already given in http://developer.android.com/

To disableAction-bar Icon and Title, you must do two things:

 setDisplayShowHomeEnabled(false);  // hides action bar icon
 setDisplayShowTitleEnabled(false); // hides action bar title

Follow The Steps given in Using split action bar

Write Following Code in OnCreate()

    protected void onCreate(Bundle savedInstanceState) {

        getActionBar().setDisplayShowHomeEnabled(false);  // hides action bar icon
        getActionBar().setDisplayShowTitleEnabled(false); // hides action bar title
        //rest of your code...

enter image description here

After Android updated Actionbar to Toolbar there are many changes in Actionbar Tabs.

Please follow below links to create swipable tabs in Andoid.

Design Structure :

Tabs Design Guidelines

enter image description here

Some of the very useful links are below. Please refer to them.

Download sample zip from below link


Or Refer these links





This may help you...