[Android] Fix dvd nav and screenshot icon visibility upon orientation changes

Nicolas Pomepuy git at videolan.org
Tue Sep 20 11:51:46 UTC 2022


vlc-android | branch: 3.5.x | Nicolas Pomepuy <nicolas at videolabs.io> | Fri Sep 16 09:06:56 2022 +0200| [54d4ec4382616f7333cfcd6d2139d72deead3a6d] | committer: Nicolas Pomepuy

Fix dvd nav and screenshot icon visibility upon orientation changes

Fixes #2684

(cherry picked from commit d69f5abe5486569a758b50e153a1da43c421bd40)

> https://code.videolan.org/videolan/vlc-android/commit/54d4ec4382616f7333cfcd6d2139d72deead3a6d
---

 .../vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt   | 2 +-
 .../src/org/videolan/vlc/gui/video/VideoPlayerOverlayDelegate.kt        | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt
index 140a56632..b59dbae02 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt
@@ -200,7 +200,7 @@ open class VideoPlayerActivity : AppCompatActivity(), PlaybackService.Callback,
     private var playbackStarted = false
 
     // Navigation handling (DVD, Blu-Ray...)
-    private var menuIdx = -1
+    var menuIdx = -1
     var isNavMenu = false
 
     /* for getTime and seek */
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerOverlayDelegate.kt b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerOverlayDelegate.kt
index ea10ba804..91b78803a 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerOverlayDelegate.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerOverlayDelegate.kt
@@ -840,6 +840,8 @@ class VideoPlayerOverlayDelegate (private val player: VideoPlayerActivity) {
             hudRightBinding.videoSecondaryDisplay.contentDescription = player.resources.getString(if (secondary) R.string.video_remote_disable else R.string.video_remote_enable)
 
             hudRightBinding.playlistToggle.visibility = if (show && player.service?.hasPlaylist() == true) View.VISIBLE else View.GONE
+            hudRightBinding.playerScreenshot.visibility = if (Settings.getInstance(player).getString(SCREENSHOT_MODE, "0") in arrayOf("1", "3")) View.VISIBLE else View.GONE
+            hudRightBinding.playerOverlayNavmenu.visibility = if (player.menuIdx >= 0) View.VISIBLE else View.GONE
             hudRightBinding.sleepQuickAction.visibility = if (show && PlaybackService.playerSleepTime.value != null) View.VISIBLE else View.GONE
             hudRightBinding.playbackSpeedQuickAction.visibility = if (show && player.service?.rate != 1.0F) View.VISIBLE else View.GONE
             hudRightBinding.spuDelayQuickAction.visibility = if (show && player.service?.spuDelay != 0L) View.VISIBLE else View.GONE



More information about the Android mailing list