coroutinedispatcher
09/27/2020, 5:39 PMMainActivity
that implements MainActivityInteraction
interface, and many fragments need this interface in order to communicated with the MainActivity
, using koins fragmentFactory
, is that achievable? I cannot actually do:
single {MainActivity()} binds arrayOf(MainActivityInteractions::class)
fragment {BlaBlaFragment(get())} // should get the interface above
Because it's dangerous. Short question, how can I achieve interface communication between fragments and a single activity with koincoroutinedispatcher
09/27/2020, 5:42 PMtynn
09/28/2020, 6:06 AMViewModel
for this purpose. You’d use by viewModel
in your activity and by sharedViewModel
in your fragments.coroutinedispatcher
09/28/2020, 6:07 AMcoroutinedispatcher
09/28/2020, 6:07 AM