I have a list of row ids and i'm trying to query them using contentprovider. This is the method and parameters:
Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder)
String selection is what determines the ID of the row. I have a list of row IDs and want to query the list. How would I implement this?
EDIT:
If anyone was interested, I finally solved this. I was able to achieve this by using a text filter and onTextChangedListener
EditText itemName = (EditText) v.findViewById(R.id.inputSearch);
itemName.addTextChangedListener(new TextWatcher() {
public void onTextChanged(CharSequence s, int start, int before, int count) {
String wildcardQuery = "%" + s + "%";
Cursor cur = getActivity().getContentResolver().query(
DrugContentProvider.CONTENT_URI,
null,
DataBaseHelper.COLUMN1 + " LIKE ?",
new String[]{wildcardQuery},
DataBaseHelper.COLUMN2 + " ASC");
testadapter = new TestPackageAdapter(getActivity().getBaseContext(), cur);
testadapter.getFilter().filter(s.toString());
mList.setAdapter(testadapter);
}