开发者

How to set the Tab Visibility in android?

开发者 https://www.devze.com 2023-04-10 06:13 出处:网络
I am having a tab widget 开发者_StackOverflowwith three tabs, I need to set the visibility for that when the:

I am having a tab widget 开发者_StackOverflowwith three tabs, I need to set the visibility for that when the:

tabhost.setcurrentTab(0);

the other two tabs should be invisible.


You need to set the visibility to View.GONE for the tab you want to hide, as follows:

tabHost.getTabWidget().getChildAt(hiddenTabPosition)
                      .setVisibility(View.GONE);
0

精彩评论

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