Skip to content

Instantly share code, notes, and snippets.

@markchristopherng
Created February 19, 2020 03:19
Show Gist options
  • Save markchristopherng/6a65581717addf2b0189d781501b1dbe to your computer and use it in GitHub Desktop.
Save markchristopherng/6a65581717addf2b0189d781501b1dbe to your computer and use it in GitHub Desktop.
class MainActivity : AppCompatActivity() {
private val greetingService: GreetingService by inject()
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
KTP.openRootScope().inject(this)
val greetings = findViewById<TextView>(R.id.greetingsTextView)
greetings.text = "${greetingService.greetings()}"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment