Search in sources :

Example 51 with JsonElement

use of com.google.gson.JsonElement in project PneumaticCraft by MineMaarten.

the class ProgWidgetConfig method readFromJson.

@Override
protected void readFromJson(JsonObject json) {
    JsonArray array = json.get("blacklist").getAsJsonArray();
    blacklistedPieces.clear();
    for (JsonElement element : array) {
        blacklistedPieces.add(element.getAsString());
    }
}
Also used : JsonArray(com.google.gson.JsonArray) JsonElement(com.google.gson.JsonElement)

Example 52 with JsonElement

use of com.google.gson.JsonElement in project PneumaticCraft by MineMaarten.

the class JsonToNBTConverter method getTag.

private NBTTagCompound getTag(JsonObject object) {
    NBTTagCompound nbt = new NBTTagCompound();
    for (Map.Entry<String, JsonElement> entry : object.entrySet()) {
        JsonObject keyObject = entry.getValue().getAsJsonObject();
        int type = keyObject.get("type").getAsInt();
        JsonElement element = keyObject.get("value");
        switch(type) {
            case 1:
                nbt.setByte(entry.getKey(), (byte) element.getAsDouble());
                break;
            case 2:
                nbt.setShort(entry.getKey(), (short) element.getAsDouble());
            case 3:
                nbt.setInteger(entry.getKey(), (int) element.getAsDouble());
                break;
            case 4:
                nbt.setLong(entry.getKey(), (long) element.getAsDouble());
                break;
            case 5:
                nbt.setFloat(entry.getKey(), (float) element.getAsDouble());
                break;
            case 6:
                nbt.setDouble(entry.getKey(), element.getAsDouble());
                break;
            //   break;
            case 8:
                nbt.setString(entry.getKey(), element.getAsString());
                break;
            case 9:
                JsonArray array = element.getAsJsonArray();
                NBTTagList tagList = new NBTTagList();
                for (JsonElement e : array) {
                    tagList.appendTag(getTag(e.getAsJsonObject()));
                }
                nbt.setTag(entry.getKey(), tagList);
                break;
            case 10:
                nbt.setTag(entry.getKey(), getTag(element.getAsJsonObject()));
                break;
            case 11:
                array = element.getAsJsonArray();
                int[] intArray = new int[array.size()];
                for (int i = 0; i < array.size(); i++) {
                    intArray[i] = array.get(i).getAsInt();
                }
                nbt.setTag(entry.getKey(), new NBTTagIntArray(intArray));
                break;
            default:
                throw new IllegalArgumentException("NBT type no " + type + " is not supported by the Json to NBT converter!");
        }
    }
    return nbt;
}
Also used : JsonArray(com.google.gson.JsonArray) NBTTagList(net.minecraft.nbt.NBTTagList) JsonElement(com.google.gson.JsonElement) NBTTagCompound(net.minecraft.nbt.NBTTagCompound) JsonObject(com.google.gson.JsonObject) Map(java.util.Map) NBTTagIntArray(net.minecraft.nbt.NBTTagIntArray)

Example 53 with JsonElement

use of com.google.gson.JsonElement in project MinecraftForge by MinecraftForge.

the class MetadataCollection method from.

public static MetadataCollection from(@Nullable InputStream inputStream, String sourceName) {
    if (inputStream == null) {
        return new MetadataCollection();
    }
    InputStreamReader reader = new InputStreamReader(inputStream);
    try {
        MetadataCollection collection;
        Gson gson = new GsonBuilder().registerTypeAdapter(ArtifactVersion.class, new ArtifactVersionAdapter()).create();
        JsonParser parser = new JsonParser();
        JsonElement rootElement = parser.parse(reader);
        if (rootElement.isJsonArray()) {
            collection = new MetadataCollection();
            JsonArray jsonList = rootElement.getAsJsonArray();
            collection.modList = new ModMetadata[jsonList.size()];
            int i = 0;
            for (JsonElement mod : jsonList) {
                collection.modList[i++] = gson.fromJson(mod, ModMetadata.class);
            }
        } else {
            collection = gson.fromJson(rootElement, MetadataCollection.class);
        }
        collection.parseModMetadataList();
        return collection;
    } catch (JsonParseException e) {
        FMLLog.log(Level.ERROR, e, "The mcmod.info file in %s cannot be parsed as valid JSON. It will be ignored", sourceName);
        return new MetadataCollection();
    } catch (Exception e) {
        throw Throwables.propagate(e);
    }
}
Also used : InputStreamReader(java.io.InputStreamReader) GsonBuilder(com.google.gson.GsonBuilder) Gson(com.google.gson.Gson) JsonParseException(com.google.gson.JsonParseException) JsonParseException(com.google.gson.JsonParseException) IOException(java.io.IOException) JsonArray(com.google.gson.JsonArray) ArtifactVersion(net.minecraftforge.fml.common.versioning.ArtifactVersion) JsonElement(com.google.gson.JsonElement) JsonParser(com.google.gson.JsonParser)

Example 54 with JsonElement

use of com.google.gson.JsonElement in project remusic by aa112901.

the class MoreFragment method setClick.

private void setClick() {
    if (muaicflowAdapter != null) {
        muaicflowAdapter.setOnItemClickListener(new MusicFlowAdapter.OnRecyclerViewItemClickListener() {

            @Override
            public void onItemClick(View view, String data) {
                switch(Integer.parseInt(data)) {
                    case 0:
                        mHandler.postDelayed(new Runnable() {

                            @Override
                            public void run() {
                                if (adapterMusicInfo.songId == MusicPlayer.getCurrentAudioId())
                                    return;
                                long[] ids = new long[1];
                                ids[0] = adapterMusicInfo.songId;
                                HashMap<Long, MusicInfo> map = new HashMap<Long, MusicInfo>();
                                map.put(ids[0], adapterMusicInfo);
                                MusicPlayer.playNext(mContext, map, ids);
                            }
                        }, 100);
                        dismiss();
                        break;
                    case 1:
                        ArrayList<MusicInfo> musicList = new ArrayList<MusicInfo>();
                        musicList.add(adapterMusicInfo);
                        AddNetPlaylistDialog.newInstance(musicList).show(getFragmentManager(), "add");
                        dismiss();
                        break;
                    case 2:
                        Intent shareIntent = new Intent();
                        shareIntent.setAction(Intent.ACTION_SEND);
                        shareIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://" + adapterMusicInfo.data));
                        shareIntent.setType("audio/*");
                        mContext.startActivity(Intent.createChooser(shareIntent, getResources().getString(R.string.shared_to)));
                        dismiss();
                        break;
                    case 3:
                        new AlertDialog.Builder(mContext).setTitle(getResources().getString(R.string.sure_to_delete_music)).setPositiveButton(getResources().getString(R.string.sure), new DialogInterface.OnClickListener() {

                            @Override
                            public void onClick(DialogInterface dialog, int which) {
                                try {
                                    Uri uri = ContentUris.withAppendedId(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI, adapterMusicInfo.songId);
                                    mContext.getContentResolver().delete(uri, null, null);
                                    if (MusicPlayer.getCurrentAudioId() == adapterMusicInfo.songId) {
                                        if (MusicPlayer.getQueueSize() == 0) {
                                            MusicPlayer.stop();
                                        } else {
                                            MusicPlayer.next();
                                        }
                                    }
                                    mHandler.postDelayed(new Runnable() {

                                        @Override
                                        public void run() {
                                            PlaylistsManager.getInstance(mContext).deleteMusic(mContext, adapterMusicInfo.songId);
                                            mContext.sendBroadcast(new Intent(IConstants.MUSIC_COUNT_CHANGED));
                                        }
                                    }, 200);
                                } catch (Exception e) {
                                    e.printStackTrace();
                                }
                                dismiss();
                            }
                        }).setNegativeButton(getResources().getString(R.string.cancel), new DialogInterface.OnClickListener() {

                            @Override
                            public void onClick(DialogInterface dialog, int which) {
                                dismiss();
                            }
                        }).show();
                        dismiss();
                        break;
                    case 4:
                        if (adapterMusicInfo.islocal) {
                            new AsyncTask<Void, Void, Void>() {

                                @Override
                                protected Void doInBackground(Void... params) {
                                    ArrayList<SearchArtistInfo> artistResults = new ArrayList<>();
                                    try {
                                        JsonObject jsonObject = HttpUtil.getResposeJsonObject(BMA.Search.searchMerge(adapterMusicInfo.artist, 1, 50)).get("result").getAsJsonObject();
                                        JsonObject artistObject = jsonObject.get("artist_info").getAsJsonObject();
                                        JsonArray artistArray = artistObject.get("artist_list").getAsJsonArray();
                                        for (JsonElement o : artistArray) {
                                            SearchArtistInfo artistInfo = MainApplication.gsonInstance().fromJson(o, SearchArtistInfo.class);
                                            artistResults.add(artistInfo);
                                        }
                                    } catch (Exception e) {
                                        e.printStackTrace();
                                    }
                                    if (artistResults.size() == 0) {
                                        mHandler.post(new Runnable() {

                                            @Override
                                            public void run() {
                                                Toast.makeText(mContext, "没有找到该艺术家", Toast.LENGTH_SHORT).show();
                                            }
                                        });
                                    } else {
                                        SearchArtistInfo info = artistResults.get(0);
                                        Intent intent = new Intent(mContext, ArtistDetailActivity.class);
                                        intent.putExtra("artistid", info.getArtist_id());
                                        intent.putExtra("artistname", info.getAuthor());
                                        mContext.startActivity(intent);
                                    }
                                    return null;
                                }
                            }.execute();
                        } else {
                            Intent intent = new Intent(mContext, ArtistDetailActivity.class);
                            intent.putExtra("artistid", adapterMusicInfo.artistId + "");
                            intent.putExtra("artistname", adapterMusicInfo.artist);
                            mContext.startActivity(intent);
                        }
                        dismiss();
                        break;
                    case 5:
                        if (adapterMusicInfo.islocal) {
                            new AsyncTask<Void, Void, Void>() {

                                @Override
                                protected Void doInBackground(Void... params) {
                                    ArrayList<SearchAlbumInfo> albumResults = new ArrayList<SearchAlbumInfo>();
                                    try {
                                        JsonObject jsonObject = HttpUtil.getResposeJsonObject(BMA.Search.searchMerge(adapterMusicInfo.albumName, 1, 10)).get("result").getAsJsonObject();
                                        JsonObject albumObject = jsonObject.get("album_info").getAsJsonObject();
                                        JsonArray albumArray = albumObject.get("album_list").getAsJsonArray();
                                        for (JsonElement o : albumArray) {
                                            SearchAlbumInfo albumInfo = MainApplication.gsonInstance().fromJson(o, SearchAlbumInfo.class);
                                            albumResults.add(albumInfo);
                                        }
                                    } catch (Exception e) {
                                        e.printStackTrace();
                                    }
                                    if (albumResults.size() == 0) {
                                        mHandler.post(new Runnable() {

                                            @Override
                                            public void run() {
                                                Toast.makeText(mContext, "没有找到所属专辑", Toast.LENGTH_SHORT).show();
                                            }
                                        });
                                    } else {
                                        SearchAlbumInfo info = albumResults.get(0);
                                        Intent intent = new Intent(mContext, AlbumsDetailActivity.class);
                                        intent.putExtra("albumid", info.getAlbum_id());
                                        intent.putExtra("albumart", info.getPic_small());
                                        intent.putExtra("albumname", info.getTitle());
                                        intent.putExtra("albumdetail", info.getAlbum_desc());
                                        mContext.startActivity(intent);
                                    }
                                    return null;
                                }
                            };
                        } else {
                            Intent intent = new Intent(mContext, AlbumsDetailActivity.class);
                            intent.putExtra("albumid", adapterMusicInfo.albumId + "");
                            intent.putExtra("albumart", adapterMusicInfo.albumData);
                            intent.putExtra("albumname", adapterMusicInfo.albumName);
                            mContext.startActivity(intent);
                        }
                        dismiss();
                        break;
                    case 6:
                        if (adapterMusicInfo.islocal) {
                            new AlertDialog.Builder(mContext).setTitle(getResources().getString(R.string.sure_to_set_ringtone)).setPositiveButton(getResources().getString(R.string.sure), new DialogInterface.OnClickListener() {

                                @Override
                                public void onClick(DialogInterface dialog, int which) {
                                    Uri ringUri = Uri.parse("file://" + adapterMusicInfo.data);
                                    RingtoneManager.setActualDefaultRingtoneUri(mContext, RingtoneManager.TYPE_NOTIFICATION, ringUri);
                                    dialog.dismiss();
                                    Toast.makeText(mContext, getResources().getString(R.string.set_ringtone_successed), Toast.LENGTH_SHORT).show();
                                    dismiss();
                                }
                            }).setNegativeButton(getResources().getString(R.string.cancel), new DialogInterface.OnClickListener() {

                                @Override
                                public void onClick(DialogInterface dialog, int which) {
                                    dialog.dismiss();
                                }
                            }).show();
                        } else {
                        }
                        break;
                    case 7:
                        MusicDetailFragment detailFrament = MusicDetailFragment.newInstance(adapterMusicInfo);
                        detailFrament.show(getActivity().getSupportFragmentManager(), "detail");
                        dismiss();
                        break;
                    default:
                        break;
                }
            }
        });
        recyclerView.setAdapter(muaicflowAdapter);
        return;
    }
    commonAdapter.setOnItemClickListener(new OverFlowAdapter.OnRecyclerViewItemClickListener() {

        @Override
        public void onItemClick(View view, String data) {
            switch(Integer.parseInt(data)) {
                case 0:
                    mHandler.postDelayed(new Runnable() {

                        @Override
                        public void run() {
                            HashMap<Long, MusicInfo> infos = new HashMap<Long, MusicInfo>();
                            int len = list.size();
                            long[] listid = new long[len];
                            for (int i = 0; i < len; i++) {
                                MusicInfo info = list.get(i);
                                listid[i] = info.songId;
                                infos.put(listid[i], info);
                            }
                            MusicPlayer.playAll(infos, listid, 0, false);
                        }
                    }, 60);
                    dismiss();
                    break;
                case 1:
                    AddNetPlaylistDialog.newInstance(list).show(getFragmentManager(), "add");
                    dismiss();
                    break;
                case 2:
                    new AsyncTask<Void, Void, Void>() {

                        @Override
                        protected Void doInBackground(Void... params) {
                            for (MusicInfo music : list) {
                                if (MusicPlayer.getCurrentAudioId() == music.songId) {
                                    if (MusicPlayer.getQueueSize() == 0) {
                                        MusicPlayer.stop();
                                    } else {
                                        MusicPlayer.next();
                                    }
                                }
                                Uri uri = ContentUris.withAppendedId(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI, music.songId);
                                mContext.getContentResolver().delete(uri, null, null);
                                PlaylistsManager.getInstance(mContext).deleteMusic(mContext, music.songId);
                            }
                            return null;
                        }

                        @Override
                        protected void onPostExecute(Void v) {
                            mContext.sendBroadcast(new Intent(IConstants.MUSIC_COUNT_CHANGED));
                        }
                    }.execute();
                    //                        Handler handler1 = new Handler();
                    //                        handler1.postDelayed(new Runnable() {
                    //                            @Override
                    //                            public void run() {
                    //                                for (final MusicInfo music : list) {
                    //                                    PlaylistsManager.getInstance(mContext).deleteMusic(mContext, music.songId);
                    //                                }
                    //                            }
                    //                        }, 100);
                    //                            file = new File(music.data);
                    //                            if (file.exists())
                    //                                file.delete();
                    //                            if (file.exists() == false) {
                    //                                mContext.sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE,
                    //                                        Uri.parse("file://" + music.data)));
                    //                            }
                    //  HandlerUtil.CommonHandler handler1 = new HandlerUtil.CommonHandler(mContext);
                    //                new Handler().postDelayed(new Runnable() {
                    //                    @Override
                    //                    public void run() {
                    //                        mContext.sendBroadcast(new Intent(IConstants.MUSIC_COUNT_CHANGED));
                    //                    }
                    //                }, 600);
                    dismiss();
                    break;
            }
        }
    });
    recyclerView.setAdapter(commonAdapter);
}
Also used : AlertDialog(android.support.v7.app.AlertDialog) HashMap(java.util.HashMap) DialogInterface(android.content.DialogInterface) MusicFlowAdapter(com.wm.remusic.adapter.MusicFlowAdapter) ArrayList(java.util.ArrayList) JsonObject(com.google.gson.JsonObject) Uri(android.net.Uri) SearchArtistInfo(com.wm.remusic.json.SearchArtistInfo) ArtistDetailActivity(com.wm.remusic.activity.ArtistDetailActivity) OverFlowAdapter(com.wm.remusic.adapter.OverFlowAdapter) SearchAlbumInfo(com.wm.remusic.json.SearchAlbumInfo) AlbumsDetailActivity(com.wm.remusic.activity.AlbumsDetailActivity) AsyncTask(android.os.AsyncTask) Intent(android.content.Intent) View(android.view.View) RecyclerView(android.support.v7.widget.RecyclerView) TextView(android.widget.TextView) JsonArray(com.google.gson.JsonArray) JsonElement(com.google.gson.JsonElement) MusicInfo(com.wm.remusic.info.MusicInfo)

Example 55 with JsonElement

use of com.google.gson.JsonElement in project remusic by aa112901.

the class NetMoreFragment method setClick.

private void setClick() {
    muaicflowAdapter.setOnItemClickListener(new MusicFlowAdapter.OnRecyclerViewItemClickListener() {

        @Override
        public void onItemClick(View view, String data) {
            switch(Integer.parseInt(data)) {
                case 0:
                    mHandler.postDelayed(new Runnable() {

                        @Override
                        public void run() {
                            if (adapterMusicInfo.songId == MusicPlayer.getCurrentAudioId())
                                return;
                            long[] ids = new long[1];
                            ids[0] = adapterMusicInfo.songId;
                            HashMap<Long, MusicInfo> map = new HashMap<Long, MusicInfo>();
                            map.put(ids[0], adapterMusicInfo);
                            MusicPlayer.playNext(mContext, map, ids);
                        }
                    }, 100);
                    dismiss();
                    break;
                case 1:
                    final ArrayList<MusicInfo> musicList = new ArrayList<MusicInfo>();
                    musicList.add(adapterMusicInfo);
                    AddNetPlaylistDialog.newInstance(musicList).show(getFragmentManager(), "add");
                    dismiss();
                    break;
                case 2:
                    Intent shareIntent = new Intent();
                    shareIntent.setAction(Intent.ACTION_SEND);
                    shareIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://" + adapterMusicInfo.data));
                    shareIntent.setType("audio/*");
                    mContext.startActivity(Intent.createChooser(shareIntent, getResources().getString(R.string.shared_to)));
                    dismiss();
                    break;
                case 3:
                    new AlertDialog.Builder(mContext).setTitle("要下载音乐吗").setPositiveButton(mContext.getString(R.string.sure), new DialogInterface.OnClickListener() {

                        @Override
                        public void onClick(DialogInterface dialog, int which) {
                            Down.downMusic(MainApplication.context, adapterMusicInfo.songId + "", adapterMusicInfo.musicName, adapterMusicInfo.artist);
                            dialog.dismiss();
                        }
                    }).setNegativeButton(mContext.getString(R.string.cancel), new DialogInterface.OnClickListener() {

                        @Override
                        public void onClick(DialogInterface dialog, int which) {
                            dialog.dismiss();
                        }
                    }).show();
                    dismiss();
                    break;
                case 4:
                    if (adapterMusicInfo.islocal) {
                        new AsyncTask<Void, Void, Void>() {

                            @Override
                            protected Void doInBackground(Void... params) {
                                ArrayList<SearchArtistInfo> artistResults = new ArrayList<>();
                                try {
                                    JsonObject jsonObject = HttpUtil.getResposeJsonObject(BMA.Search.searchMerge(adapterMusicInfo.artist, 1, 50)).get("result").getAsJsonObject();
                                    JsonObject artistObject = jsonObject.get("artist_info").getAsJsonObject();
                                    JsonArray artistArray = artistObject.get("artist_list").getAsJsonArray();
                                    for (JsonElement o : artistArray) {
                                        SearchArtistInfo artistInfo = MainApplication.gsonInstance().fromJson(o, SearchArtistInfo.class);
                                        artistResults.add(artistInfo);
                                    }
                                } catch (Exception e) {
                                    e.printStackTrace();
                                }
                                if (artistResults.size() == 0) {
                                    mHandler.post(new Runnable() {

                                        @Override
                                        public void run() {
                                            Toast.makeText(mContext, "没有找到该艺术家", Toast.LENGTH_SHORT).show();
                                        }
                                    });
                                } else {
                                    SearchArtistInfo info = artistResults.get(0);
                                    Intent intent = new Intent(mContext, ArtistDetailActivity.class);
                                    intent.putExtra("artistid", info.getArtist_id());
                                    intent.putExtra("artistname", info.getAuthor());
                                    //                                        intent.putExtra("albumid", info.getAlbum_id());
                                    //                                        intent.putExtra("albumart", info.getPic_small());
                                    //                                        intent.putExtra("albumname", info.getTitle());
                                    //                                        intent.putExtra("albumdetail",info.getAlbum_desc());
                                    mContext.startActivity(intent);
                                }
                                return null;
                            }
                        }.execute();
                    } else {
                        Intent intent = new Intent(mContext, ArtistDetailActivity.class);
                        intent.putExtra("artistid", adapterMusicInfo.artistId + "");
                        intent.putExtra("artistname", adapterMusicInfo.artist);
                        mContext.startActivity(intent);
                    }
                    dismiss();
                    break;
                case 5:
                    if (adapterMusicInfo.islocal) {
                        new AsyncTask<Void, Void, Void>() {

                            @Override
                            protected Void doInBackground(Void... params) {
                                ArrayList<SearchAlbumInfo> albumResults = new ArrayList<SearchAlbumInfo>();
                                try {
                                    JsonObject jsonObject = HttpUtil.getResposeJsonObject(BMA.Search.searchMerge(adapterMusicInfo.albumName, 1, 10)).get("result").getAsJsonObject();
                                    //                                        JsonObject artistObject =  jsonObject.get("artist_info").getAsJsonObject();
                                    //                                        JsonArray artistArray = artistObject.get("artist_list").getAsJsonArray();
                                    //                                        for (JsonElement o : artistArray) {
                                    //                                            SearchArtistInfo artistInfo =  MainApplication.gsonInstance().fromJson(o, SearchArtistInfo.class);
                                    //                                            artistResults.add(artistInfo);
                                    //                                        }
                                    Log.e("search", jsonObject.toString());
                                    JsonObject albumObject = jsonObject.get("album_info").getAsJsonObject();
                                    JsonArray albumArray = albumObject.get("album_list").getAsJsonArray();
                                    for (JsonElement o : albumArray) {
                                        SearchAlbumInfo albumInfo = MainApplication.gsonInstance().fromJson(o, SearchAlbumInfo.class);
                                        albumResults.add(albumInfo);
                                    }
                                } catch (Exception e) {
                                    e.printStackTrace();
                                }
                                if (albumResults.size() == 0) {
                                    mHandler.post(new Runnable() {

                                        @Override
                                        public void run() {
                                            Toast.makeText(mContext, "没有找到所属专辑", Toast.LENGTH_SHORT).show();
                                        }
                                    });
                                } else {
                                    SearchAlbumInfo info = albumResults.get(0);
                                    Log.e("search", info.getAlbum_id() + "  " + info.getTitle());
                                    Intent intent = new Intent(mContext, AlbumsDetailActivity.class);
                                    intent.putExtra("albumid", info.getAlbum_id());
                                    intent.putExtra("albumart", info.getPic_small());
                                    intent.putExtra("albumname", info.getTitle());
                                    intent.putExtra("albumdetail", info.getAlbum_desc());
                                    mContext.startActivity(intent);
                                }
                                return null;
                            }
                        }.execute();
                    } else {
                        Intent intent = new Intent(mContext, AlbumsDetailActivity.class);
                        intent.putExtra("albumid", adapterMusicInfo.albumId + "");
                        intent.putExtra("albumart", adapterMusicInfo.albumData);
                        intent.putExtra("albumname", adapterMusicInfo.albumName);
                        mContext.startActivity(intent);
                    }
                    dismiss();
                    break;
                case 6:
                    MusicDetailFragment detailFrament = MusicDetailFragment.newInstance(adapterMusicInfo);
                    detailFrament.show(getActivity().getSupportFragmentManager(), "detail");
                    dismiss();
                    break;
                default:
                    break;
            }
        }
    });
    recyclerView.setAdapter(muaicflowAdapter);
}
Also used : AlertDialog(android.support.v7.app.AlertDialog) HashMap(java.util.HashMap) DialogInterface(android.content.DialogInterface) MusicFlowAdapter(com.wm.remusic.adapter.MusicFlowAdapter) ArrayList(java.util.ArrayList) JsonObject(com.google.gson.JsonObject) SearchArtistInfo(com.wm.remusic.json.SearchArtistInfo) ArtistDetailActivity(com.wm.remusic.activity.ArtistDetailActivity) SearchAlbumInfo(com.wm.remusic.json.SearchAlbumInfo) AlbumsDetailActivity(com.wm.remusic.activity.AlbumsDetailActivity) AsyncTask(android.os.AsyncTask) Intent(android.content.Intent) View(android.view.View) RecyclerView(android.support.v7.widget.RecyclerView) TextView(android.widget.TextView) JsonArray(com.google.gson.JsonArray) JsonElement(com.google.gson.JsonElement) MusicInfo(com.wm.remusic.info.MusicInfo)

Aggregations

JsonElement (com.google.gson.JsonElement)682 JsonObject (com.google.gson.JsonObject)381 JsonArray (com.google.gson.JsonArray)166 JsonPrimitive (com.google.gson.JsonPrimitive)107 JsonParser (com.google.gson.JsonParser)105 Gson (com.google.gson.Gson)69 Map (java.util.Map)63 ArrayList (java.util.ArrayList)51 HashMap (java.util.HashMap)50 IOException (java.io.IOException)48 Test (org.testng.annotations.Test)45 JsonReader (com.google.gson.stream.JsonReader)31 InputStreamReader (java.io.InputStreamReader)28 GsonBuilder (com.google.gson.GsonBuilder)26 Pager (com.willshex.blogwt.shared.api.Pager)26 Type (java.lang.reflect.Type)25 StringReader (java.io.StringReader)21 Test (org.junit.Test)21 User (com.willshex.blogwt.shared.api.datatype.User)19 JsonParseException (com.google.gson.JsonParseException)17