Nisha Jain
Nisha Jain

Reputation: 77

Android Tabs appearing very large

I am implementing Tabs in my application, but the height of tab is very huge. I tried to use the following code:

TabHost tabHost = getTabHost();  // The activity TabHost
int iCnt = tabHost.getTabWidget().getChildCount();
for(int i=0; i<iCnt; i++)
    tabHost.getTabWidget().getChildAt(i).getLayoutParams().height /= 2;

but it's not affecting the height of the tab anyhow.

Upvotes: 0

Views: 110

Answers (1)

C0deAttack
C0deAttack

Reputation: 24667

You need to edit the View that is used to create the Tab. See this blog post about customizing the tab host, it'll give you an idea of how to edit the tab height; http://joshclemm.com/blog/?p=136

Upvotes: 1

Related Questions