开发者

How can reduce the height of tab widget in android?

I am working in android. i want to reduce height of the t开发者_C百科ab widget. this is the image of my tab widget.

How can reduce the height of tab widget in android?

I have added my tab widget in the bottom, 0,1,2,3 etc.

i want to reduce the height of tabwidget then the displaying digits(0,1,2,3) disappears. this is my xml for the page.:-

whenver i reduce the size of height then content does not display.

please suggest me what should i do for this. Thank you in advance....


use this code.

for (int i = 0; i < tabHost.getTabWidget().getChildCount(); i++) {
            tabHost.getTabWidget().getChildAt(i).getLayoutParams().height /=2;

        }


use this to specified in pixel

float px = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 45, getResources().getDisplayMetrics());
tab_widget.getChildAt(i).getLayoutParams().height = (int)px;


You need to create Custom Tab for Customizing your Tab Bar.

Check my post for creating Custom tab Bar Custom Tab Bar

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜