我在我的应用程序中使用了带有活动组的标签栏。我有四个标签,例如 home、stock、citn、article。在我的应用程序中,首先显示主页用户在 webview 中单击它将转到 homepage1 活动。从主页 1 活动用户单击股票选项卡,它将转到股票活动。从股票活动用户单击主页选项卡,它将转到 homepage1 活动。我想显示家庭活动,任何机构都可以告诉我该怎么做吗?
我的问题是使用活动组在选项卡之间切换,它将显示最后一个活动。我想显示第一个活动?
好的,我会附上我的代码
spec = tabHost.newTabSpec("FirstGroup").setIndicator("FirstGroup",
getWallpaper()).setContent( new Intent(this,FirstGroup.class));
tabHost.addTab(spec);
查看视图 = getLocalActivityManager().startActivity("CitiesActivity", new Intent(this,CitiesActivity.class).addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET )).getDecorView();
// Replace the view of this ActivityGroup replaceView(view); } public void replaceView(View v) { // Adds the old one to history history.add(v); // Changes this Groups View to the new View. setContentView(v);
在活动和标签之间切换
我已经在 pastebin 中发布了,我的链接是 http://pastebin.com/1zG0HJgv