I’m trying to disable certain items in my ListView by the following code
public class VSsimpleCursorAdapter extends SimpleCursorAdapter implements
Filterable {
public VSsimpleCursorAdapter(Context context, int layout, Cursor c,
String[] from, int[] to) {
super(context, layout, c, from, to);
}
public boolean areAllItemsEnabled() {
return false;
}
public boolean isEnabled(int position) {
String s = "mystring"
if (/*compare an entry in cursor with s*/){
return false;
} else
return true;
}
}
The problem is isEnabled only has one argument position. How do I use the Curser used to set the Adapter in isEnabled?
Didn’t tested it but I guess you just have to move the cursor to the specific row and get the value that should be compared to s. so something like