Android 以编程方式关闭选项卡TabHost

Android 以编程方式关闭选项卡TabHost,android,tabs,android-tabhost,Android,Tabs,Android Tabhost,如何关闭TabHost中的选项卡?(我的选项卡用于此活动)。 当我尝试时: tabHost.removeViewAt(tabHost.getCurrentTab()); 我的应用程序崩溃。这应该可以: tabHost.getTabWidget().removeView(tabHost.getTabWidget().getChildTabViewAt(tab_索引)) 其中tab\u index是要删除的选项卡的索引。这应该可以: tabHost.getTabWidget().removeVie

如何关闭TabHost中的选项卡?(我的选项卡用于此活动)。 当我尝试时:

tabHost.removeViewAt(tabHost.getCurrentTab());
我的应用程序崩溃。

这应该可以:

tabHost.getTabWidget().removeView(tabHost.getTabWidget().getChildTabViewAt(tab_索引))

其中
tab\u index
是要删除的选项卡的索引。

这应该可以:

tabHost.getTabWidget().removeView(tabHost.getTabWidget().getChildTabViewAt(tab_索引))


其中
tab\u index
是您要删除的选项卡的索引。

您得到了哪个错误?请添加一个logcat输出。您得到了哪个错误?请添加logcat输出。谢谢!请再帮我一次;)如何隐藏所有标签标题?@D.D.M.如何隐藏标签标题?谢谢!请再帮我一次;)如何隐藏所有标签标题?@D.D.M.如何隐藏标签标题?