I'm trying to implement nested RecyclerView
. I did that but parent RecyclerView
scroll was not smooth on scroll. I did alot of optimization, but still didn't manage to be successful with scroll till I though of putting parent recyclerview inside NestedScrollView
. Scroll is flawless now, but I've a problem.
If I scroll (even tiny bit) my inner RecyclerView
(horizontal), I immediately get back to the start [of vertical recyclerview - parent].
This happens one time. Why is that and is it possible to fix it?
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true">
<android.support.v7.widget.RecyclerView
android:id="@+id/parent_rv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
</android.support.v7.widget.RecyclerView>
</android.support.v4.widget.NestedScrollView>