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.
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
精彩评论