抱歉,这太旧了,无法提供帮助,但您可以使用 MergeCursor 组合这两个查询。
Cursor[] cursors = new Cursor[2];
cursors[0] = mActivity.getContentResolver().query(
MediaStore.Images.Media.EXTERNAL_CONTENT_URI,
new String[]{
MediaStore.Images.Media._ID,
MediaStore.Images.Media.DATA,
MediaStore.Images.Media.ORIENTATION,
MediaStore.Images.Media.BUCKET_DISPLAY_NAME,
MediaStore.Images.Media.BUCKET_ID,
MediaStore.Images.Media.MIME_TYPE ,
},
null,
null,
MediaStore.Images.ImageColumns.DATE_TAKEN + " DESC"
);
cursors[1] = mActivity.getContentResolver().query(
MediaStore.Images.Media.INTERNAL_CONTENT_URI,
new String[]{
MediaStore.Images.Media._ID,
MediaStore.Images.Media.DATA,
MediaStore.Images.Media.ORIENTATION,
MediaStore.Images.Media.BUCKET_DISPLAY_NAME,
MediaStore.Images.Media.BUCKET_ID,
MediaStore.Images.Media.MIME_TYPE
},
null,
null,
MediaStore.Images.ImageColumns.DATE_TAKEN + " DESC"
);
Cursor cursor = new MergeCursor(cursors);