Skip to content

Commit

Permalink
Fixed bug where getActionBarHeight would throw a ResourcesNotFoundExc…
Browse files Browse the repository at this point in the history
…eption if custom value was set for android:actionBarSize in the theme.
  • Loading branch information
richardprior committed Jul 14, 2014
1 parent b72eb27 commit fe8deb9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ private int getActionBarHeight(Context context) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
TypedValue tv = new TypedValue();
context.getTheme().resolveAttribute(android.R.attr.actionBarSize, tv, true);
result = context.getResources().getDimensionPixelSize(tv.resourceId);
result = TypedValue.complexToDimensionPixelSize(tv.data, context.getResources().getDisplayMetrics());
}
return result;
}
Expand Down

0 comments on commit fe8deb9

Please sign in to comment.