You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, nice library.
I do see something wierd with a transparent navigation bar.
On my Nexus7 the sheet does the correct thing and adds padding to the sheet bottom.
On my OneplusOne the sheet doesn't do the correct thing and make the sheet overlap with the navigation bar :(
My statusbar height implementation works on all my activities. Could you compare it with yours?
private static boolean hasNavBar(Context context) {
// Kitkat and less shows container above nav bar
if (android.os.Build.VERSION.SDK_INT <= Build.VERSION_CODES.KITKAT) {
return false;
}
// Emulator
if (Build.FINGERPRINT.startsWith("generic")) {
return true;
}
boolean hasMenuKey = ViewConfiguration.get(context).hasPermanentMenuKey();
boolean hasBackKey = KeyCharacterMap.deviceHasKey(KeyEvent.KEYCODE_BACK);
boolean hasNoCapacitiveKeys = !hasMenuKey && !hasBackKey;
Resources resources = context.getResources();
int id = resources.getIdentifier("config_showNavigationBar", "bool", "android");
boolean hasOnScreenNavBar = id > 0 && resources.getBoolean(id);
return hasOnScreenNavBar || hasNoCapacitiveKeys || getNavigationBarHeight(context, true) > 0;
}
public static int getNavigationBarHeight(Context context, boolean skipRequirement) {
int resourceId = context.getResources().getIdentifier("navigation_bar_height", "dimen", "android");
if (resourceId > 0 && (skipRequirement || hasNavBar(context))) {
return context.getResources().getDimensionPixelSize(resourceId);
}
return 0;
}
The text was updated successfully, but these errors were encountered:
I believe there are some changes in android 7.0. The workaround would be if the current android version >=7 has NavBar return false, unfortunately I don't have android 7 device so I can't test it, would you mind testing it and sending a PR to me ? Thanks
Hey, nice library.
I do see something wierd with a transparent navigation bar.
On my Nexus7 the sheet does the correct thing and adds padding to the sheet bottom.
On my OneplusOne the sheet doesn't do the correct thing and make the sheet overlap with the navigation bar :(
My statusbar height implementation works on all my activities. Could you compare it with yours?
The text was updated successfully, but these errors were encountered: