Last active
May 23, 2018 05:20
-
-
Save vprabhu/5a887a18af3a6e4a4fd2b9f9c72ff095 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
var mTodoTaskList : LiveData<List<TodoTask>> = mDatabase.todoTaskDao().getallTasks() | |
mTodoTaskList.observe( | |
this , | |
Observer<List<TodoTask>>() { | |
Log.d("List" , it?.size.toString()) | |
if (it != null) { | |
mTodoTaskAdapters = TodoTaskAdapters(this , it) | |
mTaskRecyclerView.layoutManager = LinearLayoutManager( | |
this.applicationContext , | |
LinearLayout.VERTICAL , false) | |
mTaskRecyclerView.adapter = mTodoTaskAdapters | |
} | |
} ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment