开发者

How to remove the selected tab in Android?

开发者 https://www.devze.com 2023-01-17 13:26 出处:网络
What should I do to remove only the selected tab in android? Is there anything like remove tab or anything that helps me to remove a tab in the TabWidget class or in another开发者_开发技巧 class of th

What should I do to remove only the selected tab in android? Is there anything like remove tab or anything that helps me to remove a tab in the TabWidget class or in another开发者_开发技巧 class of the Android API?


The only way I know is to use myTabHost.clearAllTabs() and than add the wanted tabs again


You need save your TabSpec in ListArray, than you delete from that ListArray current TabSpec, after that you make mTabHost.clearAllTabs() and than simply adding saved TabSpec's in cycle to your TabHost.

0

精彩评论

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

关注公众号