Adapter with multiple cells
Previously we have created presenter for one cell, but adapter isn’t limited for only one cell. So, we can change CellPresenter name for more clearly:
And similarly add more cells with their own presenters. Second cell will be as simple as the first one and for third will have custom model.
At the end just set more presenters in adapter:
Result
Source
Thank you for reading! If you liked this article, please clap so other people can read it too. I will also have more motivation for next article :) You can also see my other articles, maybe you will find something for you.
If you have any question or suggestion leave a comment.