I have a DialogFragment that contains a RecyclerView (a list of cards).
Within this RecyclerView are one or more CardVi
UPDATE 02.07.2020
This method may prevent recycling and should not be used on large data sets.
UPDATE 05.07.2019
If you are using RecyclerView inside a ScrollView, just change ScrollView to androidx.core.widget.NestedScrollView. Inside this view there is no need to pack RecyclerView inside a RelativeLayout.
Finally found the solution for this problem.
All you need to do is wrap the RecyclerView in a RelativeLayout. Maybe there are other Views which may also work.