[Android] Fix "ResizeOverlay appears only first time"

Andrew Churilo git at videolan.org
Mon Jun 20 05:33:51 UTC 2022


vlc-android | branch: master | Andrew Churilo <AndrewChuriloMinsk at gmail.com> | Sun Jun 19 15:41:07 2022 +0300| [8d143df8324d707b26e55250abde08c3d3d0790f] | committer: Nicolas Pomepuy

Fix "ResizeOverlay appears only first time"

Fixes #2577 

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

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

diff --git a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerResizeDelegate.kt b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerResizeDelegate.kt
index 011f615d6..af8cb6d8e 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerResizeDelegate.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerResizeDelegate.kt
@@ -65,8 +65,11 @@ class VideoPlayerResizeDelegate(private val player: VideoPlayerActivity) {
      * Show the resize overlay. Inflate it if it's not yet
      */
     fun showResizeOverlay() {
-        player.findViewById<ViewStubCompat>(R.id.player_resize_stub)?.let {
-            resizeMainView = it.inflate() as FrameLayout
+        player.findViewById<ViewStubCompat?>(R.id.player_resize_stub)?.let {
+            it.setVisible()
+        }
+        player.findViewById<FrameLayout>(R.id.resize_background)?.let {
+            resizeMainView = it
             val browseFrameLayout = resizeMainView.findViewById<BrowseFrameLayout>(R.id.resize_background)
             browseFrameLayout.onFocusSearchListener = BrowseFrameLayout.OnFocusSearchListener { focused, _ ->
                 if (sizeList.hasFocus()) focused // keep focus on recyclerview! DO NOT return recyclerview, but focused, which is a child of the recyclerview



More information about the Android mailing list