public class TabHostAc extends TabActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
TabHost tab=getTabHost();
TabSpec spec1=tab.newTabSpec("tab1").setIndicator("tab11",
getResources().getDrawable(R.drawable.ic_dialog_email)).
setContent(new Intent(this,ExpandLV.class));
tab.addTab(spec1);
TabSpec spec2=tab.newTabSpec("tab12").setIndicator("tab22",
getResources().getDrawable(R.drawable.ic_dialog_map)).
setContent(new Intent(this,TextViewAc.class));
tab.addTab(spec2);
}
}
TabHost的使用
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.