[Android] Fix video more item visibility on scroll
Nicolas Pomepuy
git at videolan.org
Tue Sep 7 07:36:37 UTC 2021
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Mon Sep 6 08:58:40 2021 +0200| [16de21eeab1ca9193da49e1aca3f778840f1e40e] | committer: Nicolas Pomepuy
Fix video more item visibility on scroll
Fixes #2165
> https://code.videolan.org/videolan/vlc-android/commit/16de21eeab1ca9193da49e1aca3f778840f1e40e
---
application/vlc-android/res/layout/video_grid_card.xml | 6 +++++-
application/vlc-android/res/layout/video_list_card.xml | 6 +++++-
.../vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.kt | 1 +
3 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/application/vlc-android/res/layout/video_grid_card.xml b/application/vlc-android/res/layout/video_grid_card.xml
index 321704feb..db230e445 100644
--- a/application/vlc-android/res/layout/video_grid_card.xml
+++ b/application/vlc-android/res/layout/video_grid_card.xml
@@ -21,6 +21,10 @@
name="isPresent"
type="boolean" />
+ <variable
+ name="inSelection"
+ type="boolean" />
+
<variable
name="selected"
type="boolean" />
@@ -207,7 +211,7 @@
android:contentDescription="@string/more_actions"
android:onClick="@{holder::onMoreClick}"
android:scaleType="fitEnd"
- android:visibility="@{isPresent ? View.VISIBLE : View.GONE}"
+ android:visibility="@{isPresent && !inSelection ? View.VISIBLE : View.GONE}"
vlc:layout_constraintEnd_toEndOf="parent"
vlc:layout_constraintTop_toTopOf="parent"
vlc:srcCompat="@drawable/ic_more_w" />
diff --git a/application/vlc-android/res/layout/video_list_card.xml b/application/vlc-android/res/layout/video_list_card.xml
index 0f1b525d0..2cfb84fa0 100644
--- a/application/vlc-android/res/layout/video_list_card.xml
+++ b/application/vlc-android/res/layout/video_list_card.xml
@@ -21,6 +21,10 @@
name="isPresent"
type="boolean" />
+ <variable
+ name="inSelection"
+ type="boolean" />
+
<variable
name="selected"
type="boolean" />
@@ -213,7 +217,7 @@
android:contentDescription="@string/more_actions"
android:onClick="@{holder::onMoreClick}"
android:scaleType="center"
- android:visibility="@{isPresent ? View.VISIBLE : View.GONE}"
+ android:visibility="@{isPresent && !inSelection ? View.VISIBLE : View.GONE}"
vlc:layout_constraintBottom_toBottomOf="parent"
vlc:layout_constraintEnd_toEndOf="parent"
vlc:layout_constraintTop_toTopOf="parent"
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.kt b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.kt
index 140a38517..c5d1b6b6f 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.kt
@@ -183,6 +183,7 @@ class VideoListAdapter(private var isSeenMediaMarkerVisible: Boolean
if (!isListMode) holder.binding.setVariable(BR.resolution, resolution)
}
}
+ holder.binding.setVariable(BR.inSelection, multiSelectHelper.inActionMode)
}
More information about the Android
mailing list