I need to get the height of the Android actionBar for landscape mode while the app is in portrait mode. I´m using followed code, and it works fine in portrait and in landscape mode, but I want the value before changing orientation.
TypedValue typedValue = new TypedValue();
if (context.getTheme().resolveAttribute(android.R.attr.actionBarSize, typedValue, true)) {
actionBarHeight = TypedValue.complexToDimensionPixelSize(typedValue.data, resources.getDisplayMetrics());
}