Search in sources :

Example 26 with ActionBar

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);
    }
}
Also used : ActionBar(com.actionbarsherlock.app.ActionBar)

Example 27 with ActionBar

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();
}
Also used : Bundle(android.os.Bundle) SearchedTrackListFragment(io.recom.howabout.category.music.fragment.SearchedTrackListFragment) ActionBar(com.actionbarsherlock.app.ActionBar)

Example 28 with ActionBar

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);
}
Also used : ActionBar(com.actionbarsherlock.app.ActionBar)

Example 29 with ActionBar

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));
    }
}
Also used : ActionBar(com.actionbarsherlock.app.ActionBar)

Example 30 with ActionBar

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 }));
}
Also used : Button(android.widget.Button) TextView(android.widget.TextView) LinearLayout(android.widget.LinearLayout) ActionBar(com.actionbarsherlock.app.ActionBar) GradientDrawable(android.graphics.drawable.GradientDrawable)

Aggregations

ActionBar (com.actionbarsherlock.app.ActionBar)34 Bundle (android.os.Bundle)5 TextView (android.widget.TextView)5 SherlockFragmentActivity (com.actionbarsherlock.app.SherlockFragmentActivity)3 Bitmap (android.graphics.Bitmap)2 GradientDrawable (android.graphics.drawable.GradientDrawable)2 FragmentTransaction (android.support.v4.app.FragmentTransaction)2 View (android.view.View)2 AdapterView (android.widget.AdapterView)2 Button (android.widget.Button)2 ImageView (android.widget.ImageView)2 LinearLayout (android.widget.LinearLayout)2 OnNavigationListener (com.actionbarsherlock.app.ActionBar.OnNavigationListener)2 FailReason (com.nostra13.universalimageloader.core.assist.FailReason)2 ImageLoadingListener (com.nostra13.universalimageloader.core.assist.ImageLoadingListener)2 Activity (org.holoeverywhere.app.Activity)2 DataSetObserver (android.database.DataSetObserver)1 Fragment (android.support.v4.app.Fragment)1 ViewPager (android.support.v4.view.ViewPager)1 LayoutInflater (android.view.LayoutInflater)1