[Android] Fixup video actionmode

Geoffrey Métais git at videolan.org
Fri Jan 20 14:54:38 CET 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Jan 19 18:10:20 2017 +0100| [4ff138b2d4df8f0beb188449fde5da57d98962b8] | committer: Geoffrey Métais

Fixup video actionmode

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

 vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.java | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.java
index a0cb510..8ff0d75 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.java
@@ -118,13 +118,15 @@ public class VideoListAdapter extends RecyclerView.Adapter<VideoListAdapter.View
             onBindViewHolder(holder, position);
         else {
             MediaWrapper media = mVideos.get(position);
-            boolean isSelected = media.hasStateFlags(MediaLibraryItem.FLAG_SELECTED);
-            holder.setOverlay(isSelected);
-            holder.binding.setVariable(BR.bgColor, ContextCompat.getColor(holder.itemView.getContext(), mListMode && isSelected ? R.color.orange200transparent : R.color.transparent));
             for (Object data : payloads) {
                 if (data instanceof String) {
                     media.setArtworkURL((String) payloads.get(0));
                     AsyncImageLoader.loadPicture(holder.thumbView, media);
+                } else if (data instanceof MediaWrapper) {
+                    media = (MediaWrapper) data;
+                    boolean isSelected = media.hasStateFlags(MediaLibraryItem.FLAG_SELECTED);
+                    holder.setOverlay(isSelected);
+                    holder.binding.setVariable(BR.bgColor, ContextCompat.getColor(holder.itemView.getContext(), mListMode && isSelected ? R.color.orange200transparent : R.color.transparent));
                 } else {
                     media.setTime((Long) data);
                     fillView(holder, media);



More information about the Android mailing list