adolgiy
03/23/2018, 8:59 AMView
have View#setArticle
and View#setComments
methods or only View#setContent
? Now I have two methods. And it looks OK, but what if..?ossama
03/23/2018, 9:55 AMView#setArticle
and View#setComments
methods or only View#setContent
because it depends on what they’ll have inside. You just have to keep in mind that the view doesn’t execute anything out of its concerns (like building the data that will be shown), however this data should be provided by the presenter and the View will display it as it comesadolgiy
03/23/2018, 10:01 AMView#setContent
means that presenter build final list with all data to display, including article's blocks, dividers, comments, loading more item and so on.
View#setArticle
and View#setComments
means, that presenter only passes data related to article's blocks and comments, and View by itself decides, how to handle them.
Second option looks like right way, because View's interface doesn't tell anything about RecyclerView. And first way forces me to use list-based screen layout.gildor
03/23/2018, 10:06 AMossama
03/23/2018, 10:10 AMadolgiy
03/23/2018, 10:12 AMossama
03/23/2018, 10:13 AMadolgiy
03/23/2018, 10:14 AMgildor
03/23/2018, 10:15 AMossama
03/23/2018, 10:15 AMadolgiy
03/23/2018, 10:16 AMossama
03/23/2018, 10:16 AM