From b39b580427d50c7b62d4495db45a78cbaae58391 Mon Sep 17 00:00:00 2001 From: Olivier Bouillet Date: Tue, 22 Sep 2020 23:13:23 +0200 Subject: [PATCH] navigation bar was not restored when leaving landscape mode --- .../net/schueller/peertube/activity/VideoPlayActivity.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/net/schueller/peertube/activity/VideoPlayActivity.java b/app/src/main/java/net/schueller/peertube/activity/VideoPlayActivity.java index 398312f..e02030a 100644 --- a/app/src/main/java/net/schueller/peertube/activity/VideoPlayActivity.java +++ b/app/src/main/java/net/schueller/peertube/activity/VideoPlayActivity.java @@ -295,7 +295,11 @@ public class VideoPlayActivity extends AppCompatActivity { videoPlayerFragment.setIsFullscreen(isLandscape); - getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); + if ( isLandscape ) { + getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); + } else { + getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); + } } @Override