开发者

Android Tabs appearing very large

开发者 https://www.devze.com 2023-03-31 23:08 出处:网络
I am implementing Tabs in my application, but the height of tab is very huge. I tried to use the following code:

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

0

精彩评论

暂无评论...
验证码 换一张
取 消