Skip to content

Instantly share code, notes, and snippets.

@hamzaahmedkhan
Last active January 13, 2020 15:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hamzaahmedkhan/d7118b714ed1cf21c767786b5b133ddc to your computer and use it in GitHub Desktop.
Save hamzaahmedkhan/d7118b714ed1cf21c767786b5b133ddc to your computer and use it in GitHub Desktop.
Android 10 bottom navigation bar overlapping
implementation "androidx.core:core:1.1.0"
 getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
ViewCompat.setOnApplyWindowInsetsListener(getWindow().getDecorView(), new OnApplyWindowInsetsListener() {
@Override
public WindowInsetsCompat onApplyWindowInsets(View v, WindowInsetsCompat insets) {
v.setPadding(0, 0, 0, v.getPaddingBottom() + insets.getSystemWindowInsetBottom());
return insets;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment