Created
May 6, 2020 19:09
-
-
Save Rasalexman/7396a5b9195f86f79516b64cbcfed2ab to your computer and use it in GitHub Desktop.
Getting the Kodi dependency from graph
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 | |
class MainActivity : AppCompatActivity(), IKodi { | |
val myAmazingClass: MyClass by immutableInstance() // 1. | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
// or you can get instance directly from DI | |
val myInstance = instance<MyClass>() // 2. | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment