1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.main);
Bundle bdl = new Bundle();
bdl.putInt(KEY_TYPE, TYPE_NORMAL);
mTabHost = (TabHost)findViewById(android.R.id.tabhost);
mTabHost.setup();
mTabManager = new TabManager(this, mTabHost, R.id.realtabcontent);
// TODO: localize
mTabManager.addTab(mTabHost.newTabSpec("frag1).setIndicator(createTabView(mTabHost.getContext(), "Fragment1")), Fragment1.class, bdl);
mTabManager.addTab(mTabHost.newTabSpec("frag2").setIndicator(createTabView(mTabHost.getContext(), "Fragment2"), Fragment2.class, bdl);
} |
Partager