Java tutorial
//package com.java2s; import android.content.Context; import android.content.res.TypedArray; public class Main { public static int getActionBarHeight(Context c) { int mActionBarSize; final TypedArray styledAttributes = c.getTheme() .obtainStyledAttributes(new int[] { android.R.attr.actionBarSize }); mActionBarSize = (int) styledAttributes.getDimension(0, 0); styledAttributes.recycle(); return mActionBarSize; } }