I would like to have 2 or more different CardViews
which are inflated into a single RecyclerView
.
For instance, one card with just text and another with text and an image.
At the moment I have functional code which works with the CardViews
independently, but I am unsure of how to inflate the two simultaneously.
The code I have is based off of this Tuts+ tutorial.
Please could someone offer a solution or, alternatively, a better way to do it?
CardView is an advanced View widget that allows you to add other Views onto it. Thus, for your situation, simply add another CardView in your layout file the same manner you added the initial CardView.
Hope this helps.