Java tutorial
//package com.java2s; //License from project: LGPL import android.content.Context; import android.util.TypedValue; public class Main { /** * @Description: * @param applicationContext * @return */ public static int getHeightActionBar(Context context) { int height; TypedValue typeValue = new TypedValue(); context.getTheme().resolveAttribute(android.R.attr.actionBarSize, typeValue, true); height = TypedValue.complexToDimensionPixelSize(typeValue.data, context.getResources().getDisplayMetrics()); return height; } }