Title
d

Diefferson

12/20/2017, 12:59 PM
I created an MVVM structure using ViewModelProvider.Factory with Koin, what do you think? https://github.com/diefferson/koinExample
d

Diefferson

12/21/2017, 11:22 AM
Hi @dawidhyzy, this line is to force instantiate an viewModel that is a type of ViewModel, you kan see this in https://github.com/diefferson/koinExample/blob/master/app/src/main/java/br/com/disapps/simplemvvm/ui/main/MainActivity.kt#L24
d

dawidhyzy

12/21/2017, 11:24 AM
but Hungarian notation in Kotlin?
d

Diefferson

12/21/2017, 11:33 AM
A this 'm' is of Main View model, case in my views i create another view model, i know whats is the main view model
a

arnaud.giuliani

12/21/2017, 3:10 PM
interesting
I must admit that I have to think a bit about the ViewModelFactory and how to help/provide a smart way to do that
d

Diefferson

12/21/2017, 3:19 PM
Yes, in Dagger structure this is possible with annotations, but my structure with Koin using a map is very simple too
I did not find any samples from ViewModelFactory in Koln
a

arnaud.giuliani

12/21/2017, 3:58 PM
That 's right, not yet sample about ViewModelFactory