Skip to content

Instantly share code, notes, and snippets.

@remcomokveld

remcomokveld/MyFragment.kt

Last active Apr 14, 2019
Embed
What would you like to do?
import dagger.android.support.DaggerFragment
class MyFragment: DaggerFragment() {
@Inject lateinit var viewModel: MyViewModel
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
viewModel.liveData.observe(this) { button.isEnabled = it }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment