How to hide TabWidget of tabhost?

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 );

Explaination:

  • 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.

 

You cannot comment on this entry

Rate this FAQ

1 (1 Vote)

Related entries