Skip to content

Instantly share code, notes, and snippets.

@sanogueralorenzo
Last active February 22, 2019 12:51
Show Gist options
  • Save sanogueralorenzo/c08a33557e58f8e504899ca298f810f7 to your computer and use it in GitHub Desktop.
Save sanogueralorenzo/c08a33557e58f8e504899ca298f810f7 to your computer and use it in GitHub Desktop.
private val loadFeature by lazy { Posts.init() }
private fun injectFeature() = loadFeature
class PostListActivity : AppCompatActivity() {
private val vm: PostListViewModel by viewModel()
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_post_list)
injectFeature()
//...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment