[Android] Fix subtitles download focus issues on TV
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 10:17:54 2020 +0200| [e560c4c84936f453d1b1ca048629285cfbed306b] | committer: Nicolas Pomepuy
Fix subtitles download focus issues on TV
> https://code.videolan.org/videolan/vlc-android/commit/e560c4c84936f453d1b1ca048629285cfbed306b
---
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 69fe60c28..4d929d784 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