我这里发生了一些奇怪的事情!
我有一个 Tabhost,有 3 个标签。在我的模拟器中,它工作正常,来回运行。但在我的平板电脑(HP 触摸板和三星 Galaxy Tab 1)上它不起作用。我从 Tab 1 转到 Tab 2,但无法返回。当我转到 Tab 3 时,tab3 的内容冻结,我无法返回 tab1 或 tab2(或者......至少内容没有显示它应该显示的内容(以及它在模拟器中正确显示的内容)。
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.mainmenu);
TabHost mTabHost = (TabHost)findViewById(android.R.id.tabhost);
Intent tab1 = new Intent(this, tab1.class);
TabHost.TabSpec tab1Spec = mTabHost.newTabSpec("tab1").setIndicator("tab1").setContent(tab1);
mTabHost.addTab(tab1Spec);
// this 2 more times with my other tabs.
谢谢你的帮助!我不知道我应该在哪里看,如果它(以某种方式)正确的事情:(