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 th
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 Cursor runQuery(CharSequence constraint) {
return changedAppoint.getChanges(constraint.toString());
}
});
And make changedAppoint
final
:
final DBHandlerApp changedAppoint = new DBHandlerApp (this, null, null);
See if you have any errors after the changes above.