我在非标签栏活动中的标签栏可见性有问题。如何在非标签活动中设置标签栏?
代码
TabHost tabHost = (TabHost)findViewById(android.R.id.tabhost);
TabSpec firstTabSpec = tabHost.newTabSpec("tab_id1");
TabSpec secondTabSpec = tabHost.newTabSpec("tab_id2");
TabSpec thirdTabSpec = tabHost.newTabSpec("tab_id3");
firstTabSpec.setIndicator("First").setContent(new Intent(this,FirstTab.class));
secondTabSpec.setIndicator("Second ").setContent(new Intent(this,SecondTab.class));
thirdTabSpec.setIndicator("Third").setContent(new Intent(this,ThirdTab.class));
tabHost.addTab(firstTabSpec);
tabHost.addTab(secondTabSpec);
tabHost.addTab(thirdTabSpec);
这是标签栏的代码.....我有 5 个活动..firstTab、secondTab、thirdTab、fourthActivity、fifthActivity。但问题是,选项卡栏仅对 3 个选项卡活动可见,但在第四活动和第五活动中不可见。如何在剩余活动中显示标签栏?请帮我.....
谢谢...