当前位置: 首页>>代码示例>>Java>>正文


Java Thumbnails._ID属性代码示例

本文整理汇总了Java中android.provider.MediaStore.Images.Thumbnails._ID属性的典型用法代码示例。如果您正苦于以下问题:Java Thumbnails._ID属性的具体用法?Java Thumbnails._ID怎么用?Java Thumbnails._ID使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在android.provider.MediaStore.Images.Thumbnails的用法示例。


在下文中一共展示了Thumbnails._ID属性的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;
}
 
开发者ID:gitxuyulin,项目名称:EditorImageAndText,代码行数:24,代码来源:ImagePathUtil.java

示例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();
        }
    }
}
 
开发者ID:ccfish86,项目名称:sctalk,代码行数:21,代码来源:AlbumHelper.java

示例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());

	}
}
 
开发者ID:simplelifetian,项目名称:GomeOnline,代码行数:26,代码来源:PhotoSeletorActivity.java

示例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);
}
 
开发者ID:gitxuyulin,项目名称:EditorImageAndText,代码行数:10,代码来源:AlbumHelper.java

示例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);
}
 
开发者ID:zhuyu1022,项目名称:amap,代码行数:18,代码来源:GetLocalPic.java

示例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);
}
 
开发者ID:androidWeq,项目名称:ItHome,代码行数:7,代码来源:AlbumHelper.java

示例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);
}
 
开发者ID:linmp4,项目名称:quickmark,代码行数:10,代码来源:AlbumHelper.java

示例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);
}
 
开发者ID:cymcsg,项目名称:UltimateAndroid,代码行数:10,代码来源:AlbumHelper.java

示例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);
}
 
开发者ID:Dreamer206602,项目名称:SimplifyReader2,代码行数:5,代码来源:ImagePickerHelper.java

示例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);
}
 
开发者ID:CodeDogandCat,项目名称:CarApp,代码行数:5,代码来源:AlbumHelper.java

示例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);
}
 
开发者ID:do-android,项目名称:do_Album,代码行数:8,代码来源:AlbumHelper.java


注:本文中的android.provider.MediaStore.Images.Thumbnails._ID属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。