[Android] Fix subtitles download focus issues on TV

Nicolas Pomepuy git at videolan.org
Wed Oct 21 09:02:40 CEST 2020


vlc-android | branch: 3.3.x | Nicolas Pomepuy <nicolas at videolabs.io> | Thu Sep 10 10:17:54 2020 +0200| [ee8941653ab8c7615d77d05d83d87fa23bd06255] | committer: Nicolas Pomepuy

Fix subtitles download focus issues on TV

(cherry picked from commit e560c4c84936f453d1b1ca048629285cfbed306b)

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

 application/vlc-android/res/layout/subtitle_download_item.xml | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/application/vlc-android/res/layout/subtitle_download_item.xml b/application/vlc-android/res/layout/subtitle_download_item.xml
index 69fe60c28c..4d929d7846 100644
--- a/application/vlc-android/res/layout/subtitle_download_item.xml
+++ b/application/vlc-android/res/layout/subtitle_download_item.xml
@@ -18,7 +18,10 @@
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:minHeight="50dp"
-            android:focusable="true">
+            android:focusable="true"
+            android:background="?attr/selectableItemBackground"
+            android:nextFocusRight="@+id/download_sub"
+            android:nextFocusForward="@+id/download_sub">
 
         <TextView
                 android:id="@+id/sub_title"
@@ -55,11 +58,12 @@
                 app:layout_constraintTop_toTopOf="parent"
                 tools:text="En" />
 
-        <ImageView
+        <androidx.appcompat.widget.AppCompatImageView
                 android:id="@+id/download_sub"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_marginEnd="8dp"
+                android:focusable="true"
                 android:background="?attr/selectableItemBackgroundBorderless"
                 android:contentDescription="Download"
                 android:padding="4dp"
@@ -68,7 +72,7 @@
                 app:layout_constraintBottom_toBottomOf="parent"
                 app:layout_constraintEnd_toEndOf="parent"
                 app:layout_constraintTop_toTopOf="parent"
-                tools:srcCompat="@drawable/ic_ctx_download_subtitles_normal" />
+                tools:srcCompat="@drawable/ic_download" />
 
         <ProgressBar
                 android:id="@+id/loading"



More information about the Android mailing list