Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何关闭 TabHost 中的选项卡?(我的标签这个活动)。当我尝试:
tabHost.removeViewAt(tabHost.getCurrentTab());
我的应用程序崩溃。
这应该有效:
tabHost.getTabWidget().removeView(tabHost.getTabWidget().getChildTabViewAt(tab_index));
tab_index您要删除的选项卡的索引在哪里。
tab_index