"android:layout_height="match_parent"" is the default height for the item this makes each item takes the whole length of the parent recyclerview ..
i changed it to "android:layout_height="wrap_content"" using "XML Comand Block" in "Recyclerview1_Adapter"
01) first.xml
"€€€Add_first.xml€€€" is injected to "l_containerforfirst_xml" which is in "main_list.xml".
then changed the injection to "<include
layout="@layout/first"/>" in "Recyclerview1_Adapter" in "more Blocks" using "XML Comand Block".
"first.xml" will be added as a child for "l_containerforfirst_xml"
02) second.xml
we used "ViewStub" with ID "l_containerforsecond_xml" this type of view is an invisible, zero-sized view that can be used to lazily inflate layout resources at runtime. This is useful for optimizing performance by loading views only when they are needed.
so normally it's not inflated, and you will need to inflate it when needed
The ViewStub will replace itself in its parent with the inflated view specified in android:layout.
check "l_containerforsecond_xml" xml injection in main_list.xml
03) third.xml
is added using a "LayoutInflater"
it adds "third.xml" a child for "l_containerforthird_xml"
don't forget to define the content that you will use of each child xml
avoid doublicating IDs when adding child xml by xml injection