[Android] AudioBrowserListAdapter: fix the view recycling

Adrien Maglo git at videolan.org
Mon Feb 24 22:14:45 CET 2014


vlc-ports/android | branch: master | Adrien Maglo <magsoft at videolan.org> | Mon Feb 24 21:42:13 2014 +0100| [a954d4c785894635788f2300bcf88b5ce3db7375] | committer: Adrien Maglo

AudioBrowserListAdapter: fix the view recycling

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=a954d4c785894635788f2300bcf88b5ce3db7375
---

 .../src/org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java      |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java
index 731a90f..f477492 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java
@@ -193,6 +193,7 @@ public class AudioBrowserListAdapter extends BaseAdapter {
             holder.subtitle = (TextView) v.findViewById(R.id.subtitle);
             holder.footer = (View) v.findViewById(R.id.footer);
             holder.more = (ImageView) v.findViewById(R.id.item_more);
+            holder.viewType = VIEW_MEDIA;
             v.setTag(holder);
         } else
             holder = (ViewHolder) v.getTag();
@@ -251,6 +252,7 @@ public class AudioBrowserListAdapter extends BaseAdapter {
             holder = new ViewHolder();
             holder.layout = v.findViewById(R.id.layout_item);
             holder.title = (TextView) v.findViewById(R.id.title);
+            holder.viewType = VIEW_SEPARATOR;
             v.setTag(holder);
         } else
             holder = (ViewHolder) v.getTag();



More information about the Android mailing list