How to hide TabWidget of tabhost?

~ 0 min
10-04-2012 00:35

Or how to hide the tabbar, tabgroup, whatever you may call it :)

First of all, there are different ways to achieve this, I will only show the one that worked for me.


tabhost.setVisibility( View.INVISIBLE );

Thats already it, to sum things up, here some more information:

There are a three different visibilities available in Android:

  1. tabhost.setVisibility( View.VISIBLE );
  2. tabhost.setVisibility( View.INVISIBLE );
  3. tabhost.setVisibility( View.GONE );


  • visible: visible on screen; the default value.
  • invisible: not displayed, but taken into account during layout (space is left for it).
  • gone: completely hidden, as if the view had not been added.


Average rating 1 (1 Vote)

You cannot comment on this entry