[Android] Set default icon on audio item view recycling

Geoffrey Métais git at videolan.org
Tue Nov 29 16:37:14 CET 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Nov 29 16:36:14 2016 +0100| [ebc072627fa6745f0e4dd8d2c5c9019e649fe7d9] | committer: Geoffrey Métais

Set default icon on audio item view recycling

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

 vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserAdapter.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserAdapter.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserAdapter.java
index 20b405a..4534e4c 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserAdapter.java
@@ -72,7 +72,6 @@ public class AudioBrowserAdapter extends RecyclerView.Adapter<AudioBrowserAdapte
             return;
         holder.vdb.setVariable(BR.item, mDataList.get(position));
         if (holder.getType() == MediaLibraryItem.TYPE_MEDIA) {
-            holder.vdb.setVariable(BR.cover, AsyncImageLoader.DEFAULT_COVER_AUDIO_DRAWABLE);
             boolean isSelected = mActionMode && mSelectedItems.contains(position);
             ((MediaItemViewHolder)holder).setCoverlay(isSelected);
             ((MediaItemViewHolder)holder).setViewBackground(((MediaItemViewHolder) holder).itemView.hasFocus(), isSelected);
@@ -81,7 +80,7 @@ public class AudioBrowserAdapter extends RecyclerView.Adapter<AudioBrowserAdapte
 
     @Override
     public void onViewRecycled(ViewHolder holder) {
-        holder.vdb.setVariable(BR.cover, null);
+        holder.vdb.setVariable(BR.cover, AsyncImageLoader.DEFAULT_COVER_AUDIO_DRAWABLE);
     }
 
     @Override



More information about the Android mailing list