[Android] Remove common recyclerviewpools

Geoffrey Métais git at videolan.org
Tue Jan 22 11:54:45 CET 2019


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Jan 22 09:31:14 2019 +0100| [87330e511a3016113717889ad9de522d31b19e8b] | committer: Geoffrey Métais

Remove common recyclerviewpools

It can conflict with setHasStableIds() option in adapters

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

 .../src/org/videolan/vlc/gui/audio/AudioAlbumsSongsFragment.java        | 2 --
 vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java    | 2 --
 2 files changed, 4 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioAlbumsSongsFragment.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioAlbumsSongsFragment.java
index 66544a176..9f5c06611 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioAlbumsSongsFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioAlbumsSongsFragment.java
@@ -132,13 +132,11 @@ public class AudioAlbumsSongsFragment extends BaseAudioBrowser implements SwipeR
 
         mSwipeRefreshLayout = view.findViewById(R.id.swipeLayout);
         mSwipeRefreshLayout.setOnRefreshListener(this);
-        final RecyclerView.RecycledViewPool rvp = new RecyclerView.RecycledViewPool();
         for (RecyclerView rv : mLists) {
             rv.setLayoutManager(new LinearLayoutManager(view.getContext()));
             final LinearLayoutManager llm = new LinearLayoutManager(getActivity());
             llm.setRecycleChildrenOnDetach(true);
             rv.setLayoutManager(llm);
-            rv.setRecycledViewPool(rvp);
             rv.addOnScrollListener(mScrollListener);
         }
         mFabPlay.setImageResource(R.drawable.ic_fab_play);
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
index d2ab1736b..a0ff0bca6 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
@@ -128,13 +128,11 @@ public class AudioBrowserFragment extends BaseAudioBrowser implements SwipeRefre
         mViewPager.setOffscreenPageLimit(MODE_TOTAL - 1);
         mViewPager.setAdapter(new AudioPagerAdapter(mLists, titles));
         mViewPager.setCurrentItem(mSettings.getInt(Constants.KEY_AUDIO_CURRENT_TAB, 0));
-        final RecyclerView.RecycledViewPool rvp = new RecyclerView.RecycledViewPool();
         final ArrayList<Integer> positions = savedInstanceState != null ? savedInstanceState.getIntegerArrayList(KEY_LISTS_POSITIONS) : null;
         for (int i = 0; i< MODE_TOTAL; ++i) {
             final LinearLayoutManager llm = new LinearLayoutManager(getActivity());
             llm.setRecycleChildrenOnDetach(true);
             mLists[i].setLayoutManager(llm);
-            mLists[i].setRecycledViewPool(rvp);
             mLists[i].setAdapter(mAdapters[i]);
             if (positions != null) mLists[i].scrollToPosition(positions.get(i));
             mLists[i].addOnScrollListener(mScrollListener);



More information about the Android mailing list