I'm trying to add a WHERE clause or a filtering feature in the onCreateLoader to populate values in a ListView. I think my syntax is correct, but every time the app loads to that activity, it crashes.
Here is my code:
@Override
public Loader<Cursor> onCreateLoader(int id, Bundle args) {
String courseQry = DBOpenHelper.COURSE_TERM + "=?";
String[] courseArg = {"Term 1"};
return new CursorLoader(this, CourseProvider.COURSE_CONTENT_URI,
null,courseQry, courseArg, null);
}
When i tried adding a question mark after the equal sign, I am able to load the activity, but nothing is being shown in the ListView.
I'm not really sure what to do?