jakubkinst / Android-ViewModelBinding

A lightweight library aiming to speed up Android app development by leveraging the new Android Data Binding together with the Model-View-ViewModel design pattern.
294 stars 32 forks source link

Remove UI-related methods from ViewModel.java #5

Closed petrnohejl closed 8 years ago

petrnohejl commented 8 years ago

I suggest to remove getRootView() from ViewModel.java. This method is UI-related so it should belong to View and not ViewModel. I think that ViewModel shouldn't contain any android.view, android.widget imports and rather stay POJO-like object. This ViewModel base class tends to mix business logic with UI logic which breaks MVVM architecture.