Fix issue #99
This commit is contained in:
parent
3634e5e232
commit
85164c18e9
|
@ -1353,11 +1353,9 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
|
||||||
private void toogleFullscreen(boolean fullscreen) {
|
private void toogleFullscreen(boolean fullscreen) {
|
||||||
|
|
||||||
if (fullscreen) {
|
if (fullscreen) {
|
||||||
WindowManager.LayoutParams attrs = getWindow().getAttributes();
|
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN |
|
||||||
attrs.flags &= ~WindowManager.LayoutParams.FLAG_FULLSCREEN;
|
WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||||
attrs.flags &= ~WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON;
|
Objects.requireNonNull(getSupportActionBar()).hide();
|
||||||
getWindow().setAttributes(attrs);
|
|
||||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE);
|
|
||||||
binding.bottomVideo.setVisibility(View.GONE);
|
binding.bottomVideo.setVisibility(View.GONE);
|
||||||
Objects.requireNonNull(getSupportActionBar()).hide();
|
Objects.requireNonNull(getSupportActionBar()).hide();
|
||||||
if (videoOrientationType == videoOrientation.LANDSCAPE) {
|
if (videoOrientationType == videoOrientation.LANDSCAPE) {
|
||||||
|
@ -1366,7 +1364,9 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
|
||||||
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
|
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE);
|
getWindow().setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN,
|
||||||
|
WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN);
|
||||||
|
Objects.requireNonNull(getSupportActionBar()).show();
|
||||||
binding.bottomVideo.setVisibility(View.VISIBLE);
|
binding.bottomVideo.setVisibility(View.VISIBLE);
|
||||||
Objects.requireNonNull(getSupportActionBar()).show();
|
Objects.requireNonNull(getSupportActionBar()).show();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue