Java 自定义游标用于绑定到简单\u列表\u项目的适配器\u已选中
例如,假设我有一个包含TODO的SQLite数据库,每个数据库都有一个字符串标题和一个完整的整数。如何创建一个自定义适配器(扩展CursorAdaper),将Java 自定义游标用于绑定到简单\u列表\u项目的适配器\u已选中,java,android,sqlite,cursor,Java,Android,Sqlite,Cursor,例如,假设我有一个包含TODO的SQLite数据库,每个数据库都有一个字符串标题和一个完整的整数。如何创建一个自定义适配器(扩展CursorAdaper),将android.R.layout.simple\u list\u item\u checked中的复选框绑定到已完成的整数?我已经知道必须将整数转换为布尔值,我使用的是true=1和false=0。请在适配器中重写bindView抽象方法 /** * Bind an existing view to the data pointed t
android.R.layout.simple\u list\u item\u checked
中的复选框绑定到已完成的整数?我已经知道必须将整数转换为布尔值,我使用的是true=1和false=0。请在适配器中重写bindView抽象方法
/**
* Bind an existing view to the data pointed to by cursor
* @param view Existing view, returned earlier by newView
* @param context Interface to application's global information
* @param cursor The cursor from which to get the data. The cursor is already
* moved to the correct position.
*/
public abstract void bindView(View view, Context context, Cursor cursor);