-
-
Save Ubhadiyap/e2a44fc3af56b6b4a6a29606a3ce4a25 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