Last active
April 14, 2019 19:48
-
-
Save remcomokveld/5a7e6961d9d8d1b2e7037c5f95475018 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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