Search in sources :

Example 1 with ArtistInfo

use of com.wm.remusic.json.ArtistInfo in project remusic by aa112901.

the class ArtistDetailActivity method setAlbumart.

private void setAlbumart() {
    new Thread(new Runnable() {

        @Override
        public void run() {
            JsonObject object = HttpUtil.getResposeJsonObject(BMA.Artist.artistInfo("", artistId));
            artistInfo = MainApplication.gsonInstance().fromJson(object, ArtistInfo.class);
            if (artistInfo != null && artistInfo.getAvatar_s500() != null) {
                artistPath = artistInfo.getAvatar_s500();
                mHandler.post(new Runnable() {

                    @Override
                    public void run() {
                        artistArt.setImageURI(Uri.parse(artistPath));
                    }
                });
                Log.e(TAG, artistPath);
            }
        }
    }).start();
}
Also used : JsonObject(com.google.gson.JsonObject) ArtistInfo(com.wm.remusic.json.ArtistInfo)

Example 2 with ArtistInfo

use of com.wm.remusic.json.ArtistInfo in project remusic by aa112901.

the class ArtistInfoFragment method loadContent.

private void loadContent() {
    new Thread(new Runnable() {

        @Override
        public void run() {
            JsonObject object = HttpUtil.getResposeJsonObject(BMA.Artist.artistInfo("", artistid));
            artistInfo = MainApplication.gsonInstance().fromJson(object, ArtistInfo.class);
            if (artistInfo != null && artistInfo.getAvatar_s500() != null) {
                HandlerUtil.getInstance(mContext).post(new Runnable() {

                    @Override
                    public void run() {
                        artistName.setText(artistInfo.getName());
                        artistInfoView.setText(artistInfo.getIntro());
                        frameLayout.removeAllViews();
                        frameLayout.addView(v);
                    }
                });
            }
        }
    }).start();
}
Also used : JsonObject(com.google.gson.JsonObject) ArtistInfo(com.wm.remusic.json.ArtistInfo)

Aggregations

JsonObject (com.google.gson.JsonObject)2 ArtistInfo (com.wm.remusic.json.ArtistInfo)2