getContentResolver()。query()用于获取特定宽度和高度的图像 这是正常的查询
final String[] columns = {
MediaStore.Images.Media.DATA,
MediaStore.Images.Media.WIDTH,
MediaStore.Images.Media.HEIGHT
};
Cursor mCursor = _context.getContentResolver().
query(MediaStore.Images.Media.EXTERNAL_CONTENT_URI,
columns,null,null,
MediaStore.Images.Media.DEFAULT_SORT_ORDER);
答案 0 :(得分:0)
这对寻找答案的人有帮助
String[] projection1 = {MediaStore.Images.Media.DATA};
cursor1 = getContentResolver().query(MediaStore.Images.Media.EXTERNAL_CONTENT_URI,
projection1, // Which columns to return
(MediaStore.Images.Media.HEIGHT + " <= 600" + " AND "
+ MediaStore.Images.Media.WIDTH + " <= 600"), // Return all rows
null,
null);