Actual Behaviour
Currently, all code in present in views that act as controllers
Expected Behaviour
Move code from activities and fragments to controllers
NOTE: Code in ViewModels should NOT depend on any Android classes like Context
Parent Issue : #2014
Can you please point me in the direction from where to start solving this issue. I would like to work on this but i cannot understand the issue properly. Also please tell me in what directory do i have to make the changes.
The issue is for the whole app, but you can start with one activity/fragment at a time. You need to learn about architecture components of Android SDK - https://developer.android.com/topic/libraries/architecture/index.html
Specifically, the idea of the issue is to move to MVVM pattern from MVC using ViewModel
Ok thank you. I'll try solving this and disscuss here if i find any difficulty.
@iamareebjamal I am creating child issues for this parent issue for each activity/fragment. In this way the refactor can be done one activity/fragment at a time.
@Kartik2016 Then you can comment on those issues or create them for the activity/fragment you want to work on.
Yes that would be more convenient. Thanks.
@iamareebjamal I want to work on this issue 馃憤
@codesun Please create an issue for a relevant ViewModel like everyone above and start on it :smile:
@iamareebjamal can i make a ViewModel for CommentsDialogFragment
I don't think it has such complex functionality that it requires one