Created
April 3, 2012 17:30
-
-
Save martinmidtsund/2293914 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
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); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment