Definitely! The same example with activities would look like the following:
classSignUpActivity:AppCompatActivity(){privatevalviewModelbyTODO("ViewModel declaration")overridefunonCreate(savedInstanceState:Bundle?){super.onCreate(savedInstanceState)valview=SignUpView(this)// Bind the View and ViewModelsetContentView(view)}}
All other aspects are the same.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi, I've never seen an approach to Android view like this so thank you for writing this post.
And this approach also applicable for activity too?
Hey, @_anpurnama , glad to hear that. 😄
Definitely! The same example with activities would look like the following:
All other aspects are the same.