简体   繁体   English

Android中的动态标签

[英]Dynamic Tabs in Android

How do i create dynamic tabs in Android. 如何在Android中创建动态标签。 From a list view, i click on an item and depending on the item i need to show n number of tabs. 从列表视图中,我单击一个项目,并根据我需要显示n个选项卡的项目。 Each tabs should use the same activity used by the 1st tab. 每个选项卡应使用第一个选项卡使用的相同活动。 Any help is appreciated 任何帮助表示赞赏

TabHost has a method TabHost.addTab(TabSpec tabSpec) . TabHost有一个方法TabHost.addTab(TabSpec tabSpec)。 Use that to add any number of tabs at runtime. 使用它在运行时添加任意数量的选项卡。 You can also change the name and image of the tabIndicators at run time. 您还可以在运行时更改tabIndicators的名称和图像。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM