[Android] Fix TitleListView title selectable state

Nicolas Pomepuy git at videolan.org
Wed Aug 5 14:25:24 CEST 2020


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Mon Aug  3 11:49:59 2020 +0200| [2ad30212facd476f6dff313c71c63c3683ed12df] | committer: Nicolas Pomepuy

Fix TitleListView title selectable state

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

 application/vlc-android/src/org/videolan/vlc/gui/view/TitleListView.kt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/application/vlc-android/src/org/videolan/vlc/gui/view/TitleListView.kt b/application/vlc-android/src/org/videolan/vlc/gui/view/TitleListView.kt
index a02c5545d..aaf3cd986 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/view/TitleListView.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/view/TitleListView.kt
@@ -63,6 +63,7 @@ class TitleListView : ConstraintLayout {
 
     fun setOnActionClickListener(listener: (View) -> Unit) {
         this.actionClickListener = listener
+        titleContent.isEnabled = actionClickListener != null
     }
 
     constructor(context: Context) : super(context)
@@ -89,6 +90,7 @@ class TitleListView : ConstraintLayout {
                 titleContent.setOnClickListener {
                     actionClickListener?.let { listener -> listener(actionButton) }
                 }
+                titleContent.isEnabled = actionClickListener != null
                 list.isNestedScrollingEnabled = false
             } catch (e: Exception) {
                 Log.w("", e.message, e)



More information about the Android mailing list