你好,游标适配器抛出了没有定义构造函数的错误吗?
String[] from = { "hour", "minute" };
int[] to = { android.R.id.text1,android.R.id.text2 };
SimpleCursorAdapter adapter = new SimpleCursorAdapter(this,
android.R.layout.activity_list_item, getAlarm, from, to);
,错误如下
The constructor SimpleCursorAdapter(MyDatabaseHelper, int, Cursor, String[], int[]) is undefined MyDatabaseHelper.java
答案 0 :(得分:0)
你可以试试吗
SimpleCursorAdapter adapter = new SimpleCursorAdapter(YourActivityName.this,
android.R.layout.activity_list_item, getAlarm, from, to, CursorAdapter.NO_SELECTION);
如果需要,您可以使用任何其他标志而不是CursorAdapter.NO_SELECTION。