List of usage examples for android.app ActionBar setBackgroundDrawable
public abstract void setBackgroundDrawable(@Nullable Drawable d);
From source file:io.trapped.will.trappedio.MainActivity.java
public static void setActionBarColor(String color, ActionBar actionBar) { actionBar.setBackgroundDrawable(new ColorDrawable(Color.parseColor(color))); }
From source file:com.crisFiApps.ubuntufourclocks.activities.Donations.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.donations);//from w ww .j a v a 2s. c o m FragmentTransaction ft = getSupportFragmentManager().beginTransaction(); DonationsFragment donationsFragment; if (BuildConfig.DONATIONS_GOOGLE) { donationsFragment = DonationsFragment.newInstance(BuildConfig.DEBUG, true, GOOGLE_PUBKEY, GOOGLE_CATALOG, getResources().getStringArray(R.array.donation_google_catalog_values), false, null, null, null, false, null, null, false, null); } ft.replace(R.id.donations_activity_container, donationsFragment, "donationsFragment"); ft.commit(); //En versiones superiores a Honeycomb se colorea actionbar con color Ubuntu if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.HONEYCOMB) { ActionBar actionBar = getActionBar(); if (actionBar != null) { actionBar.setBackgroundDrawable(new ColorDrawable(Color.rgb(135, 54, 79))); } } }
From source file:com.commonsware.cwac.cam2.support.ConfirmationFragment.java
@Override public void onHiddenChanged(boolean isHidden) { super.onHiddenChanged(isHidden); if (!isHidden) { ActionBar ab = getActivity().getActionBar(); ab.setBackgroundDrawable( getActivity().getResources().getDrawable(R.drawable.cwac_cam2_action_bar_bg_translucent)); ab.setTitle(""); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { ab.setDisplayHomeAsUpEnabled(true); ab.setHomeAsUpIndicator(R.drawable.cwac_cam2_ic_close_white); } else {// w ww .ja va2s.c o m ab.setIcon(R.drawable.cwac_cam2_ic_close_white); ab.setDisplayShowHomeEnabled(true); ab.setHomeButtonEnabled(true); } } }
From source file:de.vanita5.twittnuker.util.ThemeUtils.java
public static void applyActionBarBackground(final ActionBar actionBar, final Context context, final int themeRes) { if (actionBar == null || context == null) return;/* w w w. j a v a 2 s . com*/ actionBar.setBackgroundDrawable(getActionBarBackground(context, themeRes)); actionBar.setSplitBackgroundDrawable(getActionBarSplitBackground(context, themeRes)); actionBar.setStackedBackgroundDrawable(getActionBarStackedBackground(context, themeRes)); }
From source file:com.battlelancer.seriesguide.ui.FullscreenImageActivity.java
private void setupActionBar() { final ActionBar actionBar = getActionBar(); actionBar.setBackgroundDrawable(getResources().getDrawable(R.drawable.background_actionbar_gradient)); actionBar.setDisplayHomeAsUpEnabled(true); actionBar.setIcon(R.drawable.ic_actionbar); actionBar.setDisplayShowTitleEnabled(false); }
From source file:de.vanita5.twittnuker.util.ThemeUtils.java
@Deprecated public static void applyActionBarBackground(final ActionBar actionBar, final Context context, final boolean applyAlpha) { if (actionBar == null || context == null) return;//w ww. j av a 2 s. co m actionBar.setBackgroundDrawable(getActionBarBackground(context, applyAlpha)); actionBar.setSplitBackgroundDrawable(getActionBarSplitBackground(context, applyAlpha)); actionBar.setStackedBackgroundDrawable(getActionBarStackedBackground(context, applyAlpha)); }
From source file:de.vanita5.twittnuker.util.ThemeUtils.java
public static void applyActionBarBackground(final ActionBar actionBar, final Context context, final int themeRes, final int actionBarColor) { if (actionBar == null || context == null) return;/* ww w . j a v a2 s. co m*/ actionBar.setBackgroundDrawable(getActionBarBackground(context, themeRes, actionBarColor)); actionBar.setSplitBackgroundDrawable(getActionBarSplitBackground(context, themeRes)); actionBar.setStackedBackgroundDrawable(getActionBarStackedBackground(context, themeRes)); }
From source file:org.getlantern.firetweet.util.ThemeUtils.java
public static void applyActionBarBackground(final ActionBar actionBar, final Context context, final int themeRes) { if (actionBar == null || context == null) return;/* w w w . j a va2 s . c o m*/ actionBar.setBackgroundDrawable(getActionBarBackground(context, themeRes)); actionBar.setSplitBackgroundDrawable(getActionBarSplitBackground(context, themeRes)); // actionBar.setStackedBackgroundDrawable(getActionBarStackedBackground(context, themeRes)); }
From source file:org.austindroids.austindroidstestapp.MainActivity.java
@Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); ActionBar actionBar = getActionBar(); actionBar.setSubtitle("Fish App"); actionBar.setTitle("Fish App"); actionBar.setBackgroundDrawable(getResources().getDrawable(R.drawable.fish)); // Dim navigation buttons on bottom getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION); return true;//from w ww.j a v a2s . com }
From source file:de.vanita5.twittnuker.util.ThemeUtils.java
public static void applyActionBarBackground(final android.support.v7.app.ActionBar actionBar, final Context context, final int themeRes, final int actionBarColor) { if (actionBar == null || context == null) return;//from ww w . java 2 s. c om actionBar.setBackgroundDrawable(getActionBarBackground(context, themeRes, actionBarColor)); actionBar.setSplitBackgroundDrawable(getActionBarSplitBackground(context, themeRes)); actionBar.setStackedBackgroundDrawable(getActionBarStackedBackground(context, themeRes)); }