Created
October 24, 2014 15:11
-
-
Save jackgris/f673013009d750735ad2 to your computer and use it in GitHub Desktop.
How get height of ActionBarCompact
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get height action bar compat | |
TypedValue tv = new TypedValue(); | |
int attr = android.support.v7.appcompat.R.attr.actionBarSize; | |
if (getTheme().resolveAttribute(attr, tv, true)){ | |
int actionBarHeight = TypedValue.complexToDimensionPixelSize(tv.data,getResources().getDisplayMetrics()); | |
Log.w("ACTIONBAR", "height - " + actionBarHeight); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment