Last active
January 28, 2019 09:06
-
-
Save etonotieno/7eceb5d63252e479ec6f9c665b1436f9 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 NewsActivity : BaseActivity() { | |
private val newsViewModel = ViewModelProviders.of(this).get(NewsViewModel::class.java) | |
override fun onCreate(savedInstanceState :Bundle?) { | |
super.onCreate(savedInstanceState) | |
val newsBinding :ActivityNewsBinding = DataBindingUtil.setContentView(this, R.layout.activity_news) | |
newsBinding.setLifecycleOwner(this) | |
newsBinding.newsViewModel = newsViewModel | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment