Cursor Setfilterqueryprovider Issue
I'm trying to filter the results of a cursor returned from my database Handler class through the use of the 'setFilterQueryProvider' on the simple cursor adapter class. At the mome
Solution 1:
The method FilterQueryProvider() is undefined for the type ViewAppointments.
The error is pretty self explanatory, instead of providing an instance of FilterQueryProvider
to the setFilterQueryProvider()
method you call a FilterQueryProvider()
method which will mess things up. Instead it should be like this:
cursorAdapter.setFilterQueryProvider(new FilterQueryProvider() {
public CursorrunQuery(CharSequence constraint) {
return changedAppoint.getChanges(constraint.toString());
}
});
And make changedAppoint
final
:
finalDBHandlerAppchangedAppoint=newDBHandlerApp (this, null, null);
See if you have any errors after the changes above.
Solution 2:
I managed to fix this issue. It was due to a number of issues but the biggest one was the fact I had not imported the 'filterQueryProvider' widget!
Post a Comment for "Cursor Setfilterqueryprovider Issue"