like this as follow,When I want to play in full screen, the video is overlaid behind
Asked
Active
Viewed 299 times
0
-
Please write your question here, not as a link. – d219 Oct 15 '19 at 13:05
2 Answers
0
You have to use this code to hide the navigation bar:
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
mActivity.getWindow().getDecorView().setSystemUiVisibility(
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
View.SYSTEM_UI_FLAG_FULLSCREEN |
View.SYSTEM_UI_FLAG_HIDE_NAVIGATION |
//View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
}
With fullscreen options you can hide status bar too and with Immersive sticky you can get the navigation and status bar again sliding your finger.
To remove this options use the following code:
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
View decorView = mActivity.getWindow().getDecorView();
int uiOptions = decorView.getSystemUiVisibility();
uiOptions &= ~View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN;
uiOptions &= ~View.SYSTEM_UI_FLAG_FULLSCREEN;
uiOptions &= ~View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
uiOptions &= ~View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
decorView.setSystemUiVisibility(uiOptions);
}

Emilio Bello
- 9
- 2
0
you can use react-native-full-screen which provide full screen control You can put that on componentDidmount or useeffect method with FullScreen.onFullScreen();

Mayank Pandav
- 425
- 5
- 20