I need to create a custom SimpleCursorAdapter but I get an error and don't know how to fix it. I'm using a content provider with the new loader class introduced in 3.0. When creating the custom SimpleCursorAdapter I'm overriding bindView() and newView(). In bindView() (this is where I want to customize my textview to include an certain imageview based on a certain value in the database) I can't use the cursor passed in the method parameter, receiving the following error:
E/AndroidRuntime(1192): java.lang.IllegalStateException: Couldn't read row 0, col -1 from CursorWindow. Make sure the Cursor is initialized correctly before accessing data from it.
How can I implement a custom SimpleCursorAdapter while using a ContentProvider with the Loader class ?
I searched for a couple of hours and nobody seems to know or use it. Most of the articles are outdated and are using startManagingCursor() which is deprecated.
E/AndroidRuntime(1192): java.lang.IllegalStateException: Couldn't read row 0, col -1 from CursorWindow. Make sure the Cursor is initialized correctly before accessing data from it.
How can I implement a custom SimpleCursorAdapter while using a ContentProvider with the Loader class ?
I searched for a couple of hours and nobody seems to know or use it. Most of the articles are outdated and are using startManagingCursor() which is deprecated.