Android 11: transparent navigation and status bars
This commit is contained in:
parent
011cc7d337
commit
6d38615ea8
4 changed files with 30 additions and 2 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ import android.content.IntentFilter;
|
|||
import android.content.SharedPreferences;
|
||||
import android.database.ContentObserver;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.PixelFormat;
|
||||
import android.graphics.Point;
|
||||
import android.net.Uri;
|
||||
|
|
@ -1475,6 +1476,9 @@ public class VideoPlayerImpl extends VideoPlayer
|
|||
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
|
||||
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION;
|
||||
getParentActivity().getWindow().getDecorView().setSystemUiVisibility(visibility);
|
||||
if (Build.VERSION.SDK_INT >= 30 /*Android 11*/) {
|
||||
getParentActivity().getWindow().setStatusBarColor(Color.TRANSPARENT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue