Closed ShawnTheBeachy closed 6 years ago
Actually, I guess there's no reason to not just put a FrameLayout
inside the SwipeRefreshLayout
, then put the recyclerview inside that.
Also, SwipeRefreshLayout
only supports one direct child and FastScrollRecyclerView
requires support for sibling views (FastScroller
and RecyclerView
).
@randr0id Good point! Additionally, putting the FastScrollRecyclerView
inside a SwipeRefreshLayout
makes it that you are unable to drag the handle; it just tries to refresh. In case anyone happens across this wanting to do the same thing, here's what I ended up doing:
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/swipeLayout"
android:layout_height="match_parent"
android:layout_width="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_height="match_parent"
android:layout_width="match_parent" />
</android.support.v4.widget.SwipeRefreshLayout>
<com.l4digital.fastscroll.FastScroller
android:id="@+id/fastScroller"
android:layout_gravity="end"
android:layout_height="match_parent"
android:layout_marginBottom="16dp"
android:layout_marginTop="16dp"
android:layout_width="wrap_content" />
I then wired up the scroller manually as detailed in #4.
In
FastScroller.java
, where it's checking the parent layout,SwipeRefreshLayout
ought to be allowed so we can do pull to refresh.