Search in sources :

Example 1 with OverFlowAdapter

use of com.wm.remusic.adapter.OverFlowAdapter in project remusic by aa112901.

the class MoreFragment method getList.

private void getList() {
    if (type == IConstants.MUSICOVERFLOW) {
        // long musicId = Long.parseLong(args.trim());
        adapterMusicInfo = getArguments().getParcelable("music");
        if (adapterMusicInfo == null) {
            adapterMusicInfo = new MusicInfo();
        }
        artist = adapterMusicInfo.artist;
        albumId = adapterMusicInfo.albumId + "";
        albumName = adapterMusicInfo.albumName;
        musicName = adapterMusicInfo.musicName;
        topTitle.setText("歌曲:" + " " + musicName);
        heightPercent = 0.6;
        setMusicInfo();
        muaicflowAdapter = new MusicFlowAdapter(mContext, mlistInfo, adapterMusicInfo);
    } else {
        switch(type) {
            case IConstants.ARTISTOVERFLOW:
                String artist = args;
                list = MusicUtils.queryMusic(mContext, artist, IConstants.START_FROM_ARTIST);
                topTitle.setText("歌曲:" + " " + list.get(0).artist);
                break;
            case IConstants.ALBUMOVERFLOW:
                String albumId = args;
                list = MusicUtils.queryMusic(mContext, albumId, IConstants.START_FROM_ALBUM);
                topTitle.setText("专辑:" + " " + list.get(0).albumName);
                break;
            case IConstants.FOLDEROVERFLOW:
                String folder = args;
                list = MusicUtils.queryMusic(mContext, folder, IConstants.START_FROM_FOLDER);
                topTitle.setText("文件夹:" + " " + folder);
                break;
        }
        setCommonInfo();
        heightPercent = 0.3;
        commonAdapter = new OverFlowAdapter(mContext, mlistInfo, list);
    }
}
Also used : OverFlowAdapter(com.wm.remusic.adapter.OverFlowAdapter) MusicFlowAdapter(com.wm.remusic.adapter.MusicFlowAdapter) MusicInfo(com.wm.remusic.info.MusicInfo)

Aggregations

MusicFlowAdapter (com.wm.remusic.adapter.MusicFlowAdapter)1 OverFlowAdapter (com.wm.remusic.adapter.OverFlowAdapter)1 MusicInfo (com.wm.remusic.info.MusicInfo)1