Last active
January 13, 2020 15:00
-
-
Save hamzaahmedkhan/d7118b714ed1cf21c767786b5b133ddc to your computer and use it in GitHub Desktop.
Android 10 bottom navigation bar overlapping
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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