[Android] Set fastscroller on list update

Geoffrey Métais git at videolan.org
Tue Dec 13 18:53:48 CET 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Dec 13 18:53:25 2016 +0100| [bbbdd546bc9c2a090b1046d2b9dff19b7452190b] | committer: Geoffrey Métais

Set fastscroller on list update

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

 .../src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java        | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

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 828072c..6f6dc5b 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
@@ -165,9 +165,7 @@ public class AudioBrowserFragment extends BaseAudioBrowser implements DevicesDis
             ((RecyclerView) rv).setLayoutManager(new NpaLinearLayoutManager(getActivity()));
             registerForContextMenu(rv);
         }
-
         mViewPager.setOnTouchListener(mSwipeFilter);
-        mFastScroller.setRecyclerView(getCurrentRV());
     }
 
     public void onStart() {
@@ -570,8 +568,10 @@ public class AudioBrowserFragment extends BaseAudioBrowser implements DevicesDis
 
     @Override
     public void onUpdateFinished(RecyclerView.Adapter adapter) {
-        if (adapter == getCurrentAdapter())
+        if (adapter == getCurrentAdapter()) {
             updateEmptyView(mViewPager.getCurrentItem());
+            mFastScroller.setRecyclerView(getCurrentRV());
+        }
     }
 
     @Override



More information about the Android mailing list