use of com.actionbarsherlock.app.ActionBar in project ActionBarSherlock by JakeWharton.
the class Issue379 method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ActionBar ab = getSupportActionBar();
ab.setNavigationMode(NAVIGATION_MODE_TABS);
ab.addTab(ab.newTab().setTabListener(this).setText("Test"));
TextView tv = new TextView(this);
tv.setText("ColorDrawable ignores bounds on pre-HC. Make sure you see three colors.");
setContentView(tv);
}
use of com.actionbarsherlock.app.ActionBar in project ActionBarSherlock by JakeWharton.
the class SampleList method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
final ActionBar actionBar = getSupportActionBar();
actionBar.setNavigationMode(NAVIGATION_MODE_TABS);
actionBar.addTab(actionBar.newTab().setText("Open").setTabListener(this));
actionBar.addTab(actionBar.newTab().setText("Closed").setTabListener(this));
setListAdapter(mAdapter);
}
use of com.actionbarsherlock.app.ActionBar in project PlayView by GadgetCheck.
the class MainActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.content_frame);
ActionBar bar = getSupportActionBar();
bar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
bar.setDisplayHomeAsUpEnabled(true);
ActionBar.Tab tab1 = bar.newTab();
ActionBar.Tab tab2 = bar.newTab();
ActionBar.Tab tab3 = bar.newTab();
tab1.setText("TAB1");
tab2.setText("TAB2");
tab3.setText("TAB3");
tab1.setTabListener(new MyTabListener());
tab2.setTabListener(new MyTabListener());
tab3.setTabListener(new MyTabListener());
bar.addTab(tab1);
bar.addTab(tab2);
bar.addTab(tab3);
}
use of com.actionbarsherlock.app.ActionBar in project ActionBar-PullToRefresh by chrisbanes.
the class FragmentTabsActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_fragment);
// Add 3 tabs which will switch fragments
ActionBar ab = getSupportActionBar();
ab.addTab(ab.newTab().setText("Tab 1").setTabListener(this));
ab.addTab(ab.newTab().setText("Tab 2").setTabListener(this));
ab.addTab(ab.newTab().setText("Tab 3").setTabListener(this));
ab.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
}
use of com.actionbarsherlock.app.ActionBar in project ActionBar-PullToRefresh by chrisbanes.
the class FragmentTabsViewPagerActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_fragment_tabs_vp);
ViewPager vp = (ViewPager) findViewById(R.id.ptr_viewpager);
mFragmentTabPager = new FragmentTabPager(this, vp);
// Add 3 tabs which will switch fragments
ActionBar ab = getSupportActionBar();
ab.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
Bundle b = new Bundle();
b.putString(EXTRA_TITLE, "Tab 1");
mFragmentTabPager.addTab(ab.newTab().setText("Tab 1"), SampleFragment.class, b);
b = new Bundle();
b.putString(EXTRA_TITLE, "Tab 2");
mFragmentTabPager.addTab(ab.newTab().setText("Tab 2"), SampleFragment.class, b);
b = new Bundle();
b.putString(EXTRA_TITLE, "Tab 3");
mFragmentTabPager.addTab(ab.newTab().setText("Tab 3"), SampleFragment.class, b);
}
Aggregations