How To Use Different ViewHolders In The Same RecyclerView Adapter
All the apps nowadays include some sort of list one way or another. Whether the main view of your app is a list or not, one common use case is to have a list displaying multiple types of items. Then you look at the examples provided by Google and they just show some simple case where you have a plain list with no variation between its elements, which is a valid case but not so common as apps get more and more complex.
This tutorial shows you how to achieve something like the following picture with a single
Read the full article: https://javiermendonca.com/using-different-viewholders-in-the-same-recyclerview-adapter/