Hey guys, how do you handle the development of custom views in a architecture that uses MVVM or other architectural pattern.
:google: 1
For example, if i wanted to create a Image View that displays a ViewPager, with images, when clicked. Does it has to have a VM or Presenter or the actions can be handled by the custom view?
r
rkeazor
12/14/2019, 11:40 PM
Ive seen both approaches, but I honestly believe you should treat custom views like you treat other views. just control them via your xml, activity/fragment
i
Isaac Udy
12/15/2019, 1:21 AM
I think either approach works, but the option I would make would be based on the complexity of the custom view and how you intend to use it.