Search in sources :

Example 1 with Tab

use of com.actionbarsherlock.app.ActionBar.Tab in project ActionBarSherlock by JakeWharton.

the class TabNavigation method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    //Used for theme switching in samples
    setTheme(SampleList.THEME);
    super.onCreate(savedInstanceState);
    setContentView(R.layout.tab_navigation);
    mSelected = (TextView) findViewById(R.id.text);
    getSupportActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
    for (int i = 1; i <= 3; i++) {
        ActionBar.Tab tab = getSupportActionBar().newTab();
        tab.setText("Tab " + i);
        tab.setTabListener(this);
        getSupportActionBar().addTab(tab);
    }
}
Also used : Tab(com.actionbarsherlock.app.ActionBar.Tab) ActionBar(com.actionbarsherlock.app.ActionBar)

Example 2 with Tab

use of com.actionbarsherlock.app.ActionBar.Tab in project httpclient by pixmob.

the class TabNavigation method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    // Used for theme switching in samples
    setTheme(SampleList.THEME);
    super.onCreate(savedInstanceState);
    setContentView(R.layout.tab_navigation);
    mSelected = (TextView) findViewById(R.id.text);
    getSupportActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
    for (int i = 1; i <= 3; i++) {
        ActionBar.Tab tab = getSupportActionBar().newTab();
        tab.setText("Tab " + i);
        tab.setTabListener(this);
        getSupportActionBar().addTab(tab);
    }
}
Also used : Tab(com.actionbarsherlock.app.ActionBar.Tab) ActionBar(com.actionbarsherlock.app.ActionBar)

Aggregations

ActionBar (com.actionbarsherlock.app.ActionBar)2 Tab (com.actionbarsherlock.app.ActionBar.Tab)2