Created
April 12, 2020 08:31
-
-
Save fabioCollini/a71b01bcba198870389ae065d226a5e7 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
class MainActivity : AppCompatActivity() { | |
@Inject | |
lateinit var viewModelProvider: Provider<MyViewModel> | |
private val viewModel by viewModels { viewModelProvider } | |
override fun onCreate(savedInstanceState: Bundle?) { | |
(application as MyApp).component.inject(this) | |
super.onCreate(savedInstanceState) | |
//... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment