Created
January 25, 2019 11:01
-
-
Save marcinOz/4c6b8ac0e55f9f87525b318cd593fafc to your computer and use it in GitHub Desktop.
This file contains hidden or 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 MyActivity : AppCompatActivity() { | |
// inject Presenter instance, tied to current MyActivity's scope | |
val presenter : Presenter by inject() | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
// bind current lifecycle to Activity's scope | |
bindScope(createScope("activity")) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment