Skip to content

Instantly share code, notes, and snippets.

@luthfihariz
Last active August 1, 2018 01:20
Show Gist options
  • Save luthfihariz/af242d3724df7bbc2fd8f758bf69729a to your computer and use it in GitHub Desktop.
Save luthfihariz/af242d3724df7bbc2fd8f758bf69729a to your computer and use it in GitHub Desktop.
class EventListActivity : BaseActivity(){
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_event_list)
val viewModel = ViewModelProviders.of(this).get(EventListViewModel::class.java)
rvListOfEvent.layoutManager = LinearLayoutManager(this)
val adapter = EventListAdapter()
rvListOfEvent.adapter = adapter
adapter.update(viewModel.eventList)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment