Using a single RecyclerViewAdapter for every RecyclerView in your Android Application

If you have worked on android apps in the past, you must be aware of the crucial role that a RecylerView plays in the whole application. I have used this widget in all the applications that I have worked on until now and if I have learned anything about mobile apps, it is, lists are inevitable.
If the UI design requests multiple lists on multiple screens, the same number of RecyclerViews and hence, RecyclerViewAdapters, would be needed to develop this design. This might lead to a whole bunch of complex adapters for quite a large application. This article addresses these issues
Consider a survey app that demands various kinds of question sets (Single choice, Multichoice, Descriptive, etc) where the visibility of one question is dependent on the previous one. Something like this

This kind of requirement could be dealt by implementing the business logic in the adapter itself. However, that might cause laggy scrolling issues if not implemented properly. This is where our generic adapter comes to the rescue







