I have a RecyclerView with different Types of ViewHolders, that have different layout resources. Is there a way to specify all layouts in the tools:listItem namespace? If I specify all listItems layout like this:
<androidx.recyclerview.widget.RecyclerView
......
tools:listitem="@layout/layout_1"
tools:listitem="@layout/layout_2"
tools:listitem="@layout/layout_3" />
I got an error because of duplicated items. I could do something like this:
<androidx.recyclerview.widget.RecyclerView
......
tools:listitem0="@layout/layout_1"
tools:listitem1="@layout/layout_2"
tools:listitem2="@layout/layout_3" />
The error is not presented but the clicking functionality that opens the layout is lost because there is no such declaration in the namespace. It is the same when tools:showIn is used.