Recyclerview Part Of Scrollview
I have a RecyclerView as the bottom view, along with some other views on top: I want to scroll the entire view (1), not just the RecyclerView (2). I have managed to get it to work
Solution 1:
I have tried with your example
Scrolling in the
recyclerview
isn't smooth, in the sense that when I lift up my finger, the scrolling stops. No accelerated scroll, or whatever you call it.
Even I noticed that. I think there are some restrictions when you use nested scrolling as it has to handle both scrolls.
When I remove items from the
recyclerview
, its height remains the same. Meaning I have empty space where the images once was.
The white space is because of the padding
you have applied to the linear layout
of recyclerview
. Event though you remove all items from recyclerview the padding of parent linear layout
remains same and so is the whitespace.
Solution 2:
use nestedScrollView
<android.support.v4.widget.NestedScrollViewandroid:layout_width="match_parent"android:layout_height="wrap_content"><android.support.v7.widget.RecyclerViewandroid:layout_width="match_parent"android:layout_height="wrap_content"></android.support.v7.widget.RecyclerView></android.support.v4.widget.NestedScrollView>
Post a Comment for "Recyclerview Part Of Scrollview"