Skip to content

Commit

Permalink
#68 Disabled nav bar fix in API 19-
Browse files Browse the repository at this point in the history
  • Loading branch information
MewX committed Sep 7, 2020
1 parent 9bdc93b commit 493086a
Showing 1 changed file with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -322,18 +322,26 @@ private void openOrCloseDarkMode() {
}

private void updateNavigationBar() {
if (Build.VERSION.SDK_INT < 19) {
// Transparency is not supported in below KitKat.
return;
}

// test navigation bar exist
FragmentActivity activity = getActivity();
Point navBar = LightTool.getNavigationBarSize(getActivity());

// TODO: fix this margin for screen cutout.
LinearLayout ll = mainActivity.findViewById(R.id.main_menu_bottom_layout);
if (activity != null && navBar.y == 0)
if (activity != null && navBar.y == 0) {
ll.setPadding(0, 0, 0, 0); // hide
else if (activity != null && (navBar.y < 10 || navBar.y >= LightTool.getAppUsableScreenSize(activity).y))
}
else if (activity != null && (navBar.y < 10 || navBar.y >= LightTool.getAppUsableScreenSize(activity).y)) {
ll.setPadding(0, 0, 0, LightTool.getAppUsableScreenSize(activity).y / 10);
else
}
else {
ll.setPadding(0, 0, 0, navBar.y); // show
}
}

@Override
Expand Down

0 comments on commit 493086a

Please sign in to comment.