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


Java Albums.ALBUM_KEY属性代码示例

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


在下文中一共展示了Albums.ALBUM_KEY属性的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getAlbum

/**
 * @Description 得到原图
 */
@SuppressWarnings("unused")
private void getAlbum() {
    String[] projection = {
            Albums._ID, Albums.ALBUM, Albums.ALBUM_ART,
            Albums.ALBUM_KEY, Albums.ARTIST, Albums.NUMBER_OF_SONGS
    };
    Cursor cursor = null;
    try {
        cursor = contentResolver.query(Albums.EXTERNAL_CONTENT_URI,
                projection, null, null, null);
        getAlbumColumnData(cursor);
    } catch (Exception e) {
        logger.e(e.getMessage());
    } finally {
        if (null != cursor) {
            cursor.close();
        }
    }

}
 
开发者ID:ccfish86,项目名称:sctalk,代码行数:23,代码来源:AlbumHelper.java

示例2: getAlbum

/**
 * 得到原图
 */
void getAlbum() {
    String[] projection = {Albums._ID, Albums.ALBUM, Albums.ALBUM_ART,
            Albums.ALBUM_KEY, Albums.ARTIST, Albums.NUMBER_OF_SONGS};
    Cursor cursor = cr.query(Albums.EXTERNAL_CONTENT_URI, projection, null,
            null, null);
    getAlbumColumnData(cursor);

}
 
开发者ID:gitxuyulin,项目名称:EditorImageAndText,代码行数:11,代码来源:AlbumHelper.java

示例3: getAlbum

void getAlbum() {
	String[] projection = { Albums._ID, Albums.ALBUM, Albums.ALBUM_ART,
			Albums.ALBUM_KEY, Albums.ARTIST, Albums.NUMBER_OF_SONGS };
	Cursor cursor = cr.query(Albums.EXTERNAL_CONTENT_URI, projection, null,
			null, null);
	getAlbumColumnData(cursor);

}
 
开发者ID:androidWeq,项目名称:ItHome,代码行数:8,代码来源:AlbumHelper.java

示例4: getAlbum

/**
 * �õ�ԭͼ
 */
void getAlbum() {
	String[] projection = { Albums._ID, Albums.ALBUM, Albums.ALBUM_ART,
			Albums.ALBUM_KEY, Albums.ARTIST, Albums.NUMBER_OF_SONGS };
	Cursor cursor = cr.query(Albums.EXTERNAL_CONTENT_URI, projection, null,
			null, null);
	getAlbumColumnData(cursor);

}
 
开发者ID:linmp4,项目名称:quickmark,代码行数:11,代码来源:AlbumHelper.java

示例5: getAlbum

void getAlbum() {
	String[] projection = { Albums._ID, Albums.ALBUM, Albums.ALBUM_ART, Albums.ALBUM_KEY, Albums.ARTIST,
			Albums.NUMBER_OF_SONGS };
	Cursor cursor = cr.query(Albums.EXTERNAL_CONTENT_URI, projection, null, null, null);
	getAlbumColumnData(cursor);

}
 
开发者ID:CodeDogandCat,项目名称:CarApp,代码行数:7,代码来源:AlbumHelper.java

示例6: getAlbum

public void getAlbum(){
    String[] projection = { Albums._ID, Albums.ALBUM, Albums.ALBUM_ART,
            Albums.ALBUM_KEY, Albums.ARTIST, Albums.NUMBER_OF_SONGS };
    Cursor cursor = resolver.query(Albums.EXTERNAL_CONTENT_URI, projection, null,
            null, Albums._ID+" desc");
    if(cursor.moveToFirst()){
        int _id;
        String album ;
        String albumArt ;
        String albumKey;
        String artist;
        int numOfSongs;
        int _idColumn = cursor.getColumnIndex(Albums._ID);
        int albumColumn = cursor.getColumnIndex(Albums.ALBUM);
        int albumArtColumn = cursor.getColumnIndex(Albums.ALBUM_ART);
        int albumKeyColumn = cursor.getColumnIndex(Albums.ALBUM_KEY);
        int artistColumn = cursor.getColumnIndex(Albums.ARTIST);
        int numOfSongsColumn = cursor.getColumnIndex(Albums.NUMBER_OF_SONGS);
        do {
            _id = cursor.getInt(_idColumn);
            album = cursor.getString(albumColumn);
            albumArt = cursor.getString(albumArtColumn);
            albumKey = cursor.getString(albumKeyColumn);
            artist = cursor.getString(artistColumn);
            numOfSongs = cursor.getInt(numOfSongsColumn);

            HashMap<String, String> hash = new HashMap<>();
            hash.put("_id", _id + "");
            hash.put("album", album);
            hash.put("albumArt", albumArt);
            hash.put("albumKey", albumKey);
            hash.put("artist", artist);
            hash.put("numOfSongs", numOfSongs + "");
            albumList.add(hash);

        }while (cursor.moveToNext());
    }
    cursor.close();
}
 
开发者ID:zillachan,项目名称:LibZilla,代码行数:39,代码来源:AlbumHelper.java

示例7: getAlbum

/**
 * 得到原图
 */
void getAlbum() {
	String[] projection = { Albums._ID, Albums.ALBUM, Albums.ALBUM_ART,
			Albums.ALBUM_KEY, Albums.ARTIST, Albums.NUMBER_OF_SONGS };
	Cursor cursor = cr.query(Albums.EXTERNAL_CONTENT_URI, projection, null,
			null, null);
	getAlbumColumnData(cursor);

}
 
开发者ID:cymcsg,项目名称:UltimateAndroid,代码行数:11,代码来源:AlbumHelper.java


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