我已經作出了選項卡主機和示出在其中4個標籤,如下面的代碼是TabHost中的另一項活動?
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
TabHost tabHost = getTabHost();
tabHost.addTab(tabHost.newTabSpec("list").setIndicator("List").setContent(
new Intent(this, List.class)));
tabHost.addTab(tabHost.newTabSpec("profile").setIndicator("Profile").setContent(
new Intent(this, Profile.class)));
tabHost.addTab(tabHost.newTabSpec("criteria").setIndicator("Criteria").setContent(
new Intent(this, Criteria.class)));
tabHost.addTab(tabHost.newTabSpec("more").setIndicator("More").setContent(
new Intent(this, More.class)));
}
}
在資料,我有一個按鈕,用於將編輯的用戶簡檔,因爲我點擊該按鈕時,它調用方法如下
@Override
public void onClick(View v) {
System.out.println("Veer");
Intent intent = new Intent().setClass(this, EditProfile.class);
Intent intent = new Intent(this, EditProfile.class);
}
哪裏是顯示EditProfile,但標籤是不可見,因爲在iPhone它是可見的所有的時間,現在我應該怎麼做,這樣我的標籤應高於和EditProfile是配置文件選項卡中?