开发者

Don't want any tab widget selected in tab host <android>

开发者 https://www.devze.com 2023-03-28 23:53 出处:网络
Can anyone please help to solve this : I have 5 tab widgets in my TabHost; when I start my TabActivity extended class, 开发者_运维问答the fist tab-widget is selected by default, but I don\'t want to s

Can anyone please help to solve this : I have 5 tab widgets in my TabHost; when I start my TabActivity extended class, 开发者_运维问答the fist tab-widget is selected by default, but I don't want to select any until user click on one.

I also tried setting the selected tab to -1, but it's not working.

Please help me if you know the way to solve it.


You can add an extra Tab, as your first tab, and make that tab invisible. When you create the first time your TabActivity select that tab.( setCurrentTab(0));

0

精彩评论

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

关注公众号