What is model, view and controller in Android RecyclerView?
I use Model class, Adapter class and Activity while using a RecyclerView in android.
I wanted to know what is model, view and controller here and why ?
Solution
Model is a class that you passed on RecyclerView.Adapter, for example let say we have News.class that has property like title and description.
Controller is the Activity because it controlls and manipulates what input that inserted into the model data. For example we get data from REST webservice and convert it into list of models.
View is the RecyclerView.Adapter, because how to display the model data is configured in here. But inside the RecyclerView.Adapter, there is MVC concept too.. There is Model, ViewHolder, and OnBindViewHolder