0

如何关闭 TabHost 中的选项卡?(我的标签这个活动)。当我尝试:

tabHost.removeViewAt(tabHost.getCurrentTab());

我的应用程序崩溃。

4

1 回答 1

3

这应该有效:

tabHost.getTabWidget().removeView(tabHost.getTabWidget().getChildTabViewAt(tab_index));

tab_index您要删除的选项卡的索引在哪里。

于 2012-09-25T17:23:28.600 回答