Hi guys, i just recently applied MVP. Now i wonder how to properly create recyclerview using this architecture? Thanks!
:google: 5
k
Kashif
01/08/2020, 7:27 AM
hi Joey, what is issue in creating RV with mvp?
Simply create a RV with default data array and when presenter loads the data then update RV with new data list
j
Joey
01/08/2020, 7:28 AM
Im a bit lost where to put the adapter. @Kashif
k
Kashif
01/08/2020, 7:30 AM
its as simple as your regular work without mvp
onCreate method init RV and bind adapter with it and when app gets data from Presenter then update the adapter
j
Joey
01/08/2020, 8:52 AM
Thanks! @Kashif
k
Kashif
01/08/2020, 8:52 AM
👍
z
zhuinden
01/08/2020, 9:10 AM
the RecyclerView Adapter Item defines an interface for the "event handler" that is passed in to the adapter so that the items can communicate to it. This is typically the Fragment. Then the Fragment communicates with the Presenter.