[Android] Fix focus issue on video player

Nicolas Pomepuy git at videolan.org
Mon Sep 14 08:06:35 CEST 2020


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Thu Sep 10 13:00:02 2020 +0200| [9283b2f58ba54d4891fca7d08b6dcb97e9a0302e] | committer: Nicolas Pomepuy

Fix focus issue on video player

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

 application/vlc-android/res/layout/ab_repeat_controls.xml                | 1 +
 application/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt    | 1 +
 .../src/org/videolan/vlc/gui/video/VideoPlayerOverlayDelegate.kt         | 1 +
 3 files changed, 3 insertions(+)

diff --git a/application/vlc-android/res/layout/ab_repeat_controls.xml b/application/vlc-android/res/layout/ab_repeat_controls.xml
index 151ccaaa7..c1118ae54 100644
--- a/application/vlc-android/res/layout/ab_repeat_controls.xml
+++ b/application/vlc-android/res/layout/ab_repeat_controls.xml
@@ -49,6 +49,7 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_marginEnd="8dp"
+            android:visibility="gone"
             vlc:layout_constraintBottom_toBottomOf="parent"
             vlc:layout_constraintEnd_toEndOf="parent"
             vlc:layout_constraintStart_toEndOf="@+id/imageView9"
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt b/application/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt
index 53d689341..072ba402d 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt
@@ -169,6 +169,7 @@ class AudioPlayer : Fragment(), PlaylistAdapter.IPlayer, TextWatcher, IAudioPlay
         })
         playlistModel.service?.playlistManager?.abRepeatOn?.observe(viewLifecycleOwner, Observer {
             binding.abRepeatMarkerGuidelineContainer.visibility = if (it) View.VISIBLE else View.GONE
+            abRepeatAddMarker.visibility = if (it) View.VISIBLE else View.GONE
 
             playlistModel.service?.manageAbRepeatStep(binding.abRepeatReset, binding.abRepeatStop, binding.abRepeatContainer, abRepeatAddMarker)
         })
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 6f477bd6e..659da5dbc 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
@@ -392,6 +392,7 @@ class VideoPlayerOverlayDelegate (private val player: VideoPlayerActivity) {
                     if (player.settings.getBoolean(VIDEO_TRANSITION_SHOW, true)) showOverlayTimeout(if (abvalues.start == -1L || abvalues.stop == -1L) VideoPlayerActivity.OVERLAY_INFINITE else VideoPlayerActivity.OVERLAY_TIMEOUT)
                 })
                 service.playlistManager.abRepeatOn.observe(player, Observer {
+                    abRepeatAddMarker.visibility = if (it) View.VISIBLE else View.GONE
                     hudBinding.abRepeatMarkerGuidelineContainer.visibility = if (it) View.VISIBLE else View.GONE
                     if (it) showOverlay(true)
                     if (it) {



More information about the Android mailing list