Advertisement
Guest User

Untitled

a guest
May 30th, 2015
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. // Calculate default ActionBar height
  2. TypedValue tv = new TypedValue();
  3. if (getTheme().resolveAttribute(android.R.attr.actionBarSize, tv, true)){
  4. actionBarHeight = TypedValue.complexToDimensionPixelSize(tv.data,getResources().getDisplayMetrics());
  5. }
  6.  
  7.  
  8. // Height of an instance.
  9. // NOTE: Only works on the ActionBar/Toolbar instance
  10. actionBar.getHeight();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement