Skip to content

Commit

Permalink
use config_showNavigationBar resource value instead of hasPermanentMe…
Browse files Browse the repository at this point in the history
…nuKey() - fixes #13
  • Loading branch information
jgilfelt committed Mar 19, 2014
1 parent 8817624 commit 579d6b2
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ public static class SystemBarConfig {
private static final String NAV_BAR_HEIGHT_RES_NAME = "navigation_bar_height";
private static final String NAV_BAR_HEIGHT_LANDSCAPE_RES_NAME = "navigation_bar_height_landscape";
private static final String NAV_BAR_WIDTH_RES_NAME = "navigation_bar_width";
private static final String SHOW_NAV_BAR_RES_NAME = "config_showNavigationBar";

private final boolean mTranslucentStatusBar;
private final boolean mTranslucentNavBar;
Expand Down Expand Up @@ -378,7 +379,10 @@ private int getNavigationBarHeight(Context context) {
Resources res = context.getResources();
int result = 0;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
if (!ViewConfiguration.get(context).hasPermanentMenuKey()) {
int resourceId = res.getIdentifier(SHOW_NAV_BAR_RES_NAME, "bool", "android");
boolean hasNavBar = (resourceId > 0) ? res.getBoolean(resourceId) : false;
//if (!ViewConfiguration.get(context).hasPermanentMenuKey()) {
if (hasNavBar) {
String key;
if (mInPortrait) {
key = NAV_BAR_HEIGHT_RES_NAME;
Expand Down

0 comments on commit 579d6b2

Please sign in to comment.