JSonArray jsonArray = new JSonArray(jsonString);for (int i = 0; i < jsonArray.length(); i++) { HashMap<String, Object> map = new HashMap<String, Object>(); JSonObject jsonObject = (JSONObject) jsonArray.get(i); int id = jsonObject.getInt("id"); String name = jsonObject.getString("name"); byte[] byteArray = base64.depre(jsonObject.getString("image"), base64.DEFAULT) ; Bitmap bmp1 = BitmapFactory.depreByteArray(byteArray, 0, byteArray.length); //Bitmap bitmap = Bitmap.createScaledBitmap(bmp1, 120, 120, false); map.put("id", id); map.put("name", name); map.put("image", bmp1); playersList.add(map); //Log.d("SHOW PLAYER LIST: " ,playersList.toString());}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)