List of utility methods to do ActionBar Set
Drawable | setColor(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 { ... |
int | getActionBarSize(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; |