Android Utililty Methods ActionBar Set

List of utility methods to do ActionBar Set

Description

The list of methods to do ActionBar Set are organized into topic(s).

Method

DrawablesetColor(ActionBarActivity activity, int colorRes, Drawable oldBackground, Drawable.Callback drawableCallback)
set Color
Drawable colorDrawable = new ColorDrawable(colorRes);
if (oldBackground == null) {
    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1)
        colorDrawable.setCallback(drawableCallback);
    else
        activity.getSupportActionBar().setBackgroundDrawable(
                colorDrawable);
} else {
...
intgetActionBarSize(Context context)
Get the action bar size in pixel.
final TypedArray styledAttributes = context.getTheme()
        .obtainStyledAttributes(
                new int[] { android.R.attr.actionBarSize });
final int actionBarSize = (int) styledAttributes.getDimension(0, 0);
styledAttributes.recycle();
return actionBarSize;