Is it possible to change the size of the RecyclerView?

I want to change the size of the RecyclerView when clicked. Such as his settings of width & height :
wrap content
And clicking I want to change to fixed settings.
June 27th 19 at 15:36
1 answer
June 27th 19 at 15:38
Wrap RecyclerView in RelativeLayout and use LayoutParams to it.

<relativelayout android:layout_width="parent" android:layout_height="wrap content">
 < android:id="@+id/images" android:layout_width="wrap content" android:layout_height="360dp">

RelativeLayout.LayoutParams lp =
 new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.PARENT, 500);
when clicking, it works fine, and if you again click to show the full list, it duplicates each Item RecyclerView line - Princess_Treutel commented on June 27th 19 at 15:41

Find more questions by tags Android