How can I retrieve ActionBar.Tab Height?

111 Views Asked by At

I'm working with AppCompat and I use the ActionBar.Tab to set Tab's and now I need to get Tab Height ?

Any help will be appreciated.

2

There are 2 best solutions below

1
Cyrus On

You can use either

getToolbar().getHeight();

or if you're using the AppCompatActivity

getSupportActionBar().getHeight();

Assuming you've set the toolbar.

Cheers

1
Jorgesys On

try with :

   TabHost myTabHost= getTabHost(); 
   int tabHeight = myTabHost.getTabWidget().getHeight();