2012-06-13 260 views
0

我會創建一個tabhost,並確保您按下一個選項卡,它會顯示一個活動,其佈局設置爲xml。怎麼做?活動鏈接選項卡

我覺得像這樣的命令:

tabHost.addTab(tabHost.newTabSpec("Factory").setContent(
new MyTabContentFactory(this)).setIndicator("Factory")); 

我能正常加載佈局類MyTabContentFactory?

+0

在MyTabContentFactory類中設置佈局 –

回答

0
TabSpec spec3 = tabhost.newTabSpec("Mention"); 
spec3.setIndicator("Menti", getResources().getDrawable(R.drawable.ic_launcher)); 
spec3.setContent(new Intent().setClass(this,Mention.class));  
相關問題