I don't think this problem is caused from my ListActivity subclass. I think it has something to do with with my BaseAdapter subclass:
package com.mohit.gtodo;
import com.mohit.gtodo.database.TasksDBAdapter;
import android.content.Context;
import android.database.Cursor;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CheckBox;
import android.widget.CursorAdapter;
import android.widget.TextView;
public class TasksCursorAdapter extends CursorAdapter {
public TasksCursorAdapter(Context context, Cursor c) {
super(context, c);
}
@Override
public void bindView(View view, Context context, Cursor cursor) {
CheckBox completed = (CheckBox) view.findViewById(R.id.completed);
TextView title = (TextView) view.findViewById(R.id.title);
title.setText(cursor.getString(cursor.getColumnIndex(TasksDBAdapter.KEY_TITLE)));
completed.setChecked(cursor.getInt(cursor.getColumnIndex(TasksDBAdapter.KEY_COMPLETED)) > 0);
}
@Override
public View newView(Context context, Cursor cursor, ViewGroup parent) {
LayoutInflater inflater = LayoutInflater.from(context);
View view = inflater.inflate(R.layout.list_item, null);
return view;
}
}
Am I forgetting a method override?