本文整理汇总了Java中android.provider.MediaStore.Images.Thumbnails.DATA属性的典型用法代码示例。如果您正苦于以下问题:Java Thumbnails.DATA属性的具体用法?Java Thumbnails.DATA怎么用?Java Thumbnails.DATA使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类android.provider.MediaStore.Images.Thumbnails
的用法示例。
在下文中一共展示了Thumbnails.DATA属性的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getThumbnail
/**
* 得到缩略图
*/
private static HashMap<String, String> getThumbnail(ContentResolver cr) {
String[] projection = {Thumbnails._ID, Thumbnails.IMAGE_ID,
Thumbnails.DATA};
Cursor cursor = cr.query(Thumbnails.EXTERNAL_CONTENT_URI, projection,
null, null, null);
HashMap<String, String> thumbnailList = new HashMap<String, String>();
if (cursor.moveToFirst()) {
int image_id;
String image_path;
int image_idColumn = cursor.getColumnIndex(Thumbnails.IMAGE_ID);
int dataColumn = cursor.getColumnIndex(Thumbnails.DATA);
do {
image_id = cursor.getInt(image_idColumn);
image_path = cursor.getString(dataColumn);
thumbnailList.put("" + image_id, image_path);
} while (cursor.moveToNext());
cursor.close();
}
return thumbnailList;
}
示例2: getThumbnail
/**
* 得到缩略图
*/
private void getThumbnail() {
String[] projection = {
Thumbnails._ID, Thumbnails.IMAGE_ID,
Thumbnails.DATA
};
Cursor cursor = null;
try {
cursor = contentResolver.query(Thumbnails.EXTERNAL_CONTENT_URI,
projection, null, null, null);
getThumbnailColumnData(cursor);
} catch (Exception e) {
logger.e(e.getMessage());
} finally {
if (null != cursor) {
cursor.close();
}
}
}
示例3: getThumbnails
public void getThumbnails() {
ContentResolver cr = getContentResolver();
String[] projection = { Thumbnails._ID, Thumbnails.IMAGE_ID, Thumbnails.DATA };
Cursor cur = cr.query(Thumbnails.EXTERNAL_CONTENT_URI, projection, null, null, null);
if (cur.moveToFirst()) {
int _id;
int image_id;
String image_path;
int _idColumn = cur.getColumnIndex(Thumbnails._ID);
int image_idColumn = cur.getColumnIndex(Thumbnails.IMAGE_ID);
int dataColumn = cur.getColumnIndex(Thumbnails.DATA);
do {
// Get the field values
_id = cur.getInt(_idColumn);
image_id = cur.getInt(image_idColumn);
image_path = cur.getString(dataColumn);
// Do something with the values.
Log.e(TAG, _id + " image_id:" + image_id + " path:" + image_path + "---");
} while (cur.moveToNext());
}
}
示例4: getThumbnail
/**
* 得到缩略图
*/
private void getThumbnail() {
String[] projection = {Thumbnails._ID, Thumbnails.IMAGE_ID,
Thumbnails.DATA};
Cursor cursor = cr.query(Thumbnails.EXTERNAL_CONTENT_URI, projection,
null, null, null);
getThumbnailColumnData(cursor);
}
示例5: findimagepath
/**
*
* 通过ContentResolver查找本地图库照片的url
*
* @LastModifiedDate:2013-12-6
* @author he
*/
private static void findimagepath(Context mContext)
{
list = new ArrayList<String>();
ContentResolver cr = mContext.getContentResolver();
String[] imagedata = { Thumbnails._ID, Thumbnails.IMAGE_ID,
Thumbnails.DATA };// 找到image
Cursor cursor = cr.query(Thumbnails.EXTERNAL_CONTENT_URI, imagedata,
null, null, null); // 利用游标找image
getColumnData(cursor);
}
示例6: getThumbnail
private void getThumbnail() {
String[] projection = { Thumbnails._ID, Thumbnails.IMAGE_ID,
Thumbnails.DATA };
Cursor cursor = cr.query(Thumbnails.EXTERNAL_CONTENT_URI, projection,
null, null, null);
getThumbnailColumnData(cursor);
}
示例7: getThumbnail
/**
* �õ�����ͼ
*/
private void getThumbnail() {
String[] projection = { Thumbnails._ID, Thumbnails.IMAGE_ID,
Thumbnails.DATA };
Cursor cursor = cr.query(Thumbnails.EXTERNAL_CONTENT_URI, projection,
null, null, null);
getThumbnailColumnData(cursor);
}
示例8: getThumbnail
/**
* 得到缩略图
*/
private void getThumbnail() {
String[] projection = { Thumbnails._ID, Thumbnails.IMAGE_ID,
Thumbnails.DATA };
Cursor cursor = cr.query(Thumbnails.EXTERNAL_CONTENT_URI, projection,
null, null, null);
getThumbnailColumnData(cursor);
}
示例9: getThumbnail
private void getThumbnail() {
String[] projection = { Thumbnails._ID, Thumbnails.IMAGE_ID, Thumbnails.DATA };
Cursor cursor = contentResolver.query(Thumbnails.EXTERNAL_CONTENT_URI, projection, null, null, null);
getThumbnailColumnData(cursor);
}
示例10: getThumbnail
private void getThumbnail() {
String[] projection = { Thumbnails._ID, Thumbnails.IMAGE_ID, Thumbnails.DATA };
Cursor cursor = cr.query(Thumbnails.EXTERNAL_CONTENT_URI, projection, null, null, null);
getThumbnailColumnData(cursor);
}
示例11: getThumbnail
/**
* 得到缩略图
*/
private void getThumbnail() {
String[] projection = { Thumbnails._ID, Thumbnails.IMAGE_ID, Thumbnails.DATA };
Cursor cursor = cr.query(Thumbnails.EXTERNAL_CONTENT_URI, projection, null, null, null);
getThumbnailColumnData(cursor);
}