开发者

The constructor SimpleCursorAdapter(MyProgram, int, Cursor, int) is undefined

开发者 https://www.devze.com 2023-01-02 11:39 出处:网络
Keep getting \"The constructor SimpleCursorAdapter(MyProgram, int, Cursor, int) is undefined\" and am not sure why. Here is my code.

Keep getting "The constructor SimpleCursorAdapter(MyProgram, int, Cursor, int) is undefined" and am not sure why. Here is my code.

  Cursor c = mDbHelper.getAllTypes();
   startManagingCursor(c);
  SimpleCursorAdapter notes = new SimpleCursorA开发者_Go百科dapter(this, R.layout.list_item1, c, R.id.text1);
      setListAdapter(notes);

Any ideas?


Looking at the API docs for SimpleCursorAdapter shows the following signature:

SimpleCursorAdapter(Context ctx, int layout, Cursor c, String[] from, int[] to)

So you need to modify your call accordingly.

0

精彩评论

暂无评论...
验证码 换一张
取 消