FileDocCategorySizeDatePackage
Tabs1.javaAPI DocAndroid 1.5 API1771Wed May 06 22:41:08 BST 2009com.example.android.apis.view

Tabs1

public class Tabs1 extends android.app.TabActivity
An example of tabs that uses labels ({@link TabSpec#setIndicator(CharSequence)}) for its indicators and views by id from a layout file ({@link TabSpec#setContent(int)}).

Fields Summary
Constructors Summary
Methods Summary
protected voidonCreate(android.os.Bundle savedInstanceState)

        super.onCreate(savedInstanceState);
        TabHost tabHost = getTabHost();
        
        LayoutInflater.from(this).inflate(R.layout.tabs1, tabHost.getTabContentView(), true);

        tabHost.addTab(tabHost.newTabSpec("tab1")
                .setIndicator("tab1")
                .setContent(R.id.view1));
        tabHost.addTab(tabHost.newTabSpec("tab3")
                .setIndicator("tab2")
                .setContent(R.id.view2));
        tabHost.addTab(tabHost.newTabSpec("tab3")
                .setIndicator("tab3")
                .setContent(R.id.view3));