我正在使用Android的内置内容提供商android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI。
现在我有了
String[] sarray = {"a" , "b" , "c" , "d"};`
String[] projection = {MediaStore.MediaColumns._ID , MediaStore.MediaColumns.DATA};
String selection = ?????? // My qestion
cursor = getContentResolver().query(uri, projection, null,
null , order);
那么如何编写我的光标行,以便选择All But But Not saray
FROM MediaStore.MediaColumns._ID
列。
答案 0 :(得分:0)
试试这个:
String[] sarray = {"a" , "b" , "c" , "d"};
String[] projection = {MediaStore.MediaColumns._ID , MediaStore.MediaColumns.DATA};
String selection =""+MediaStore.MediaColumns._ID+" !=? AND "+MediaStore.MediaColumns._ID+"" +
" !=? AND "+MediaStore.MediaColumns._ID+" !=? AND "+MediaStore.MediaColumns._ID+" !=?";
cursor = getContentResolver().query(uri, projection, selection,
sarray , order);