parent
8e9fa6eb5b
commit
e2651eb4b2
|
|
@ -78,7 +78,9 @@ public class BaseActivity extends MaterialActivity {
|
||||||
window.setStatusBarColor(Color.TRANSPARENT);
|
window.setStatusBarColor(Color.TRANSPARENT);
|
||||||
|
|
||||||
window.getDecorView().post(() -> {
|
window.getDecorView().post(() -> {
|
||||||
if (window.getDecorView().getRootWindowInsets().getSystemWindowInsetBottom() >= Resources.getSystem().getDisplayMetrics().density * 40) {
|
var rootWindowInsets = window.getDecorView().getRootWindowInsets();
|
||||||
|
if (rootWindowInsets != null &&
|
||||||
|
rootWindowInsets.getSystemWindowInsetBottom() >= Resources.getSystem().getDisplayMetrics().density * 40) {
|
||||||
window.setNavigationBarColor(ResourceUtils.resolveColor(getTheme(), android.R.attr.navigationBarColor) & 0x00ffffff | -0x20000000);
|
window.setNavigationBarColor(ResourceUtils.resolveColor(getTheme(), android.R.attr.navigationBarColor) & 0x00ffffff | -0x20000000);
|
||||||
} else {
|
} else {
|
||||||
window.setNavigationBarColor(Color.TRANSPARENT);
|
window.setNavigationBarColor(Color.TRANSPARENT);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue