[Android] Cleaning in view recycling is not helpful
Geoffrey Métais
git at videolan.org
Wed Nov 16 11:30:59 CET 2016
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Nov 16 11:29:36 2016 +0100| [915f5df08d50eec5b357837d4a9e8cf2cc1102d6] | committer: Geoffrey Métais
Cleaning in view recycling is not helpful
> https://code.videolan.org/videolan/vlc-android/commit/915f5df08d50eec5b357837d4a9e8cf2cc1102d6
---
.../src/org/videolan/vlc/gui/audio/AudioBrowserAdapter.java | 7 -------
.../src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java | 12 ------------
.../src/org/videolan/vlc/gui/video/VideoListAdapter.java | 10 ----------
3 files changed, 29 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 ac62500..138adb7 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserAdapter.java
@@ -77,13 +77,6 @@ public class AudioBrowserAdapter extends RecyclerView.Adapter<AudioBrowserAdapte
}
@Override
- public void onViewRecycled(ViewHolder holder) {
- holder.vdb.setVariable(BR.cover, null);
- holder.vdb.setVariable(BR.item, null);
- holder.vdb.executePendingBindings();
- }
-
- @Override
public int getItemCount() {
return mDataList == null ? 0 : mDataList.size();
}
diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java
index bed36b4..16f80d5 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java
@@ -124,18 +124,6 @@ public class BaseBrowserAdapter extends RecyclerView.Adapter<BaseBrowserAdapter
}
@Override
- public void onViewRecycled(ViewHolder holder) {
- if (holder.getType() == TYPE_MEDIA) {
- final MediaViewHolder vh = (MediaViewHolder) holder;
- vh.binding.setItem(null);
- vh.binding.setHasContextMenu(false);
- vh.binding.setProtocol(null);
- vh.binding.setImage(null);
- vh.binding.executePendingBindings();
- }
- }
-
- @Override
public int getItemCount() {
return mMediaList.size();
}
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 c527223..7acb0b0 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.java
@@ -108,16 +108,6 @@ public class VideoListAdapter extends RecyclerView.Adapter<VideoListAdapter.View
holder.setViewBackground(mActionMode && isSelected);
}
- @Override
- public void onViewRecycled(ViewHolder holder) {
- holder.binding.setVariable(BR.cover, null);
- holder.binding.setVariable(BR.resolution, null);
- holder.binding.setVariable(BR.time, null);
- holder.binding.setVariable(BR.max, 0);
- holder.binding.setVariable(BR.progress, 0);
- holder.binding.executePendingBindings();
- }
-
@MainThread
void setTimes( Map<Long, Long> times) {
// update times
More information about the Android
mailing list