For my app I am using a RecyclerView inside a ScrollView where the RecyclerView has a height based on its content using this library. Scrolling is working but it's not working smoothly when I scroll over the RecyclerView. When I scroll over the ScrollView itself it is scrolling smoothly.
The code I am using to define the RecyclerView:
LinearLayoutManager friendsLayoutManager = new LinearLayoutManager(getActivity().getApplicationContext(), android.support.v7.widget.LinearLayoutManager.VERTICAL, false); mFriendsListView.setLayoutManager(friendsLayoutManager); mFriendsListView.addItemDecoration(new DividerItemDecoration(getActivity().getApplicationContext(), null)); The RecyclerView in the ScrollView:
<android.support.v7.widget.RecyclerView android:layout_marginTop="10dp" android:layout_marginBottom="10dp" android:id="@+id/friendsList" android:layout_width="match_parent" android:layout_height="wrap_content" />
androidx.constraintlayout.widget.ConstraintLayoutwhich will solve your problem without any complex implementations