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) {
|
||||
|
||||
if (fullscreen) {
|
||||
WindowManager.LayoutParams attrs = getWindow().getAttributes();
|
||||
attrs.flags &= ~WindowManager.LayoutParams.FLAG_FULLSCREEN;
|
||||
attrs.flags &= ~WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON;
|
||||
getWindow().setAttributes(attrs);
|
||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE);
|
||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN |
|
||||
WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||
Objects.requireNonNull(getSupportActionBar()).hide();
|
||||
binding.bottomVideo.setVisibility(View.GONE);
|
||||
Objects.requireNonNull(getSupportActionBar()).hide();
|
||||
if (videoOrientationType == videoOrientation.LANDSCAPE) {
|
||||
|
@ -1366,7 +1364,9 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
|
|||
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
|
||||
}
|
||||
} 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);
|
||||
Objects.requireNonNull(getSupportActionBar()).show();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue