Last active
August 20, 2017 22:32
-
-
Save joecks/0ea0ed899f726768b672261d08a19e30 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
// BaseReacteFragment method which auto listenes to viewData updates | |
override fun applyViewData(viewData: TasksViewData) { | |
mTasksFragBinding.viewmodel = viewData | |
mListAdapter.tasks = viewData.items | |
SnackbarUtils.showMessage(view, viewData.message) | |
} | |
... | |
// Bind the TasksViewItemActions to the adapter (onItemClick, onItemCheck) | |
mListAdapter = TasksAdapter( | |
ArrayList<Task>(0), | |
viewModel | |
) | |
... | |
// Bind onTaskClicked to viewModel | |
mTasksFragBinding.listener = viewModel |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment