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);
}
use of com.actionbarsherlock.app.ActionBar in project android-ui-design-pattern by MathieuCalba.
the class FeedItemActivity method initActionBar.
private void initActionBar() {
final ActionBar ab = getSupportActionBar();
ab.setDisplayHomeAsUpEnabled(true);
ab.setDisplayShowHomeEnabled(true);
ab.setHomeButtonEnabled(true);
ab.setDisplayShowTitleEnabled(true);
ab.setTitle(null);
}
use of com.actionbarsherlock.app.ActionBar in project android-ui-design-pattern by MathieuCalba.
the class HomeActivity method initActionBar.
private void initActionBar() {
setRefreshingState(false);
final ActionBar ab = getSupportActionBar();
ab.setDisplayHomeAsUpEnabled(false);
ab.setDisplayShowHomeEnabled(true);
ab.setHomeButtonEnabled(false);
ab.setDisplayShowTitleEnabled(false);
}
use of com.actionbarsherlock.app.ActionBar in project mobile-android by photo.
the class PhotoDetailsFragment method photoSelected.
void photoSelected(final Photo photo) {
ActionBar actionBar = ((Activity) getSupportActivity()).getSupportActionBar();
String title = photo.getTitle();
if (TextUtils.isEmpty(title)) {
title = photo.getFilenameOriginal();
}
actionBar.setTitle(getString(R.string.details_title_and_date_header, title, CommonUtils.formatDateTime(photo.getDateTaken())));
titleText.setText(title);
dateText.setText(CommonUtils.formatDateTime(photo.getDateTaken()));
privateBtn.setVisibility(photo.isPrivate() ? View.VISIBLE : View.GONE);
ensureThumbVisible(photo);
}
Aggregations