[Android] Fix bookmark layout upon orientation changes

Nicolas Pomepuy git at videolan.org
Wed Jul 12 13:10:26 UTC 2023


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Wed Jul 12 08:53:36 2023 +0200| [b5a7aeabcb7ee0efccf74f596bf292b8102924d3] | committer: Nicolas Pomepuy

Fix bookmark layout upon orientation changes

Fixes #2489

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

 .../src/org/videolan/vlc/gui/video/VideoPlayerOverlayDelegate.kt   | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

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 f18434c13a..e83ea13c00 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
@@ -996,8 +996,11 @@ class VideoPlayerOverlayDelegate (private val player: VideoPlayerActivity) {
 
     fun rotateBookmarks() {
         if (::bookmarkListDelegate.isInitialized && isBookmarkShown()) {
-            bookmarkListDelegate.hide()
-            showBookmarks()
+            //make sure the rotation is complete and layout is done before resetting the bookmarks' layout
+            hudBinding.progressOverlay.post {
+                bookmarkListDelegate.hide()
+                showBookmarks()
+            }
         }
     }
 



More information about the Android mailing list