Android 11: transparent navigation and status bars

This commit is contained in:
Avently 2020-09-14 11:30:41 +03:00
parent b76aa495d2
commit 72c716c1b3
4 changed files with 30 additions and 2 deletions

View file

@ -2003,6 +2003,10 @@ public class VideoDetailFragment
}
activity.getWindow().getDecorView().setSystemUiVisibility(0);
activity.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
if (Build.VERSION.SDK_INT >= 30 /*Android 11*/) {
activity.getWindow().setStatusBarColor(ThemeHelper.resolveColorFromAttr(
requireContext(), android.R.attr.colorPrimary));
}
}
private void hideSystemUi() {