Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void updateCheckedTasks() {
- ListView listView = getListView();
- int nrOfTasks = listView.getCount();
- Log.i("TODO", "This is the number of tasks = "+nrOfTasks); // This prints the 5 items in the list
- Task task = null;
- for(int i = 0; i < nrOfTasks;i++) {
- task = (Task) listView.getItemAtPosition(i); // This doesn't seem to work
- Log.i("TODO", "Task = "+task); // This prints that the task is null
- if(task.isDone()) listView.setItemChecked(i, true);
- }
- }
Add Comment
Please, Sign In to add comment