use of com.actionbarsherlock.app.ActionBar in project httpclient by pixmob.
the class MainActivity method showDropDownNav.
private void showDropDownNav() {
ActionBar ab = getSupportActionBar();
if (ab.getNavigationMode() != ActionBar.NAVIGATION_MODE_LIST) {
ab.setDisplayShowTitleEnabled(false);
ab.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
}
}
use of com.actionbarsherlock.app.ActionBar in project howabout-android by recomio.
the class SearchedTrackListActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Bundle bundle = getIntent().getExtras();
searchKeyword = bundle.getString("searchKeyword");
ActionBar actionBar = getSupportActionBar();
actionBar.setTitle(R.string.menu_search);
actionBar.setSubtitle(searchKeyword);
searchedTrackListFragment = new SearchedTrackListFragment();
Bundle recommendedTrackListFragmentBundle = new Bundle();
recommendedTrackListFragmentBundle.putString("searchKeyword", searchKeyword);
searchedTrackListFragment.setArguments(recommendedTrackListFragmentBundle);
getSupportFragmentManager().beginTransaction().replace(R.id.contentView, searchedTrackListFragment, "music_search").commit();
}
use of com.actionbarsherlock.app.ActionBar in project howabout-android by recomio.
the class TrackListActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ActionBar actionBar = getSupportActionBar();
actionBar.setDisplayHomeAsUpEnabled(true);
setAdsContainer(R.id.adView);
}
use of com.actionbarsherlock.app.ActionBar in project ActionBarSherlock by JakeWharton.
the class Issue240 method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.issue240);
mPager = (ViewPager) findViewById(R.id.pager);
mPager.setAdapter(new MyAdapter(getSupportFragmentManager()));
mPager.setOnPageChangeListener(this);
ActionBar ab = getSupportActionBar();
ab.setNavigationMode(NAVIGATION_MODE_TABS);
for (int i = 1; i <= COUNT; i++) {
ab.addTab(ab.newTab().setText("Tab " + i).setTabListener(this));
}
}
use of com.actionbarsherlock.app.ActionBar in project ActionBarSherlock by JakeWharton.
the class Issue435 method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
LinearLayout layout = new LinearLayout(this);
layout.setOrientation(LinearLayout.VERTICAL);
TextView t = new TextView(this);
t.setText("Must be on a portrait device where the tabs are stacked. Stacked background will disappear when action mode is triggered.");
layout.addView(t);
Button b = new Button(this);
b.setText("Start ActionMode");
b.setOnClickListener(this);
layout.addView(b);
setContentView(layout);
ActionBar ab = getSupportActionBar();
ab.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
ab.addTab(ab.newTab().setText("One").setTabListener(this));
ab.addTab(ab.newTab().setText("One").setTabListener(this));
ab.addTab(ab.newTab().setText("One").setTabListener(this));
ab.setBackgroundDrawable(new GradientDrawable(TOP_BOTTOM, new int[] { 0xFF004400, 0xFF002200 }));
ab.setStackedBackgroundDrawable(new GradientDrawable(TOP_BOTTOM, new int[] { 0xFF440000, 0xFF220000 }));
}
Aggregations