Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Ion.with(this)
- .load("http://marketplace.envato.com/api/edge/search:audiojungle,,happy.json")
- .asString().setCallback(new FutureCallback<String>() {
- @Override
- public void onCompleted(Exception arg0, String data) {
- // TODO Auto-generated method stub
- try {
- JSONObject jObject = new JSONObject(data);
- JSONArray jArray = jObject.getJSONArray("search");
- for (int i = 0; i < jArray.length(); i++) {
- JSONObject jObject_0 = jArray.getJSONObject(i);
- JSONObject jObj = jObject_0
- .getJSONObject("item_info");
- cost.setText(jObj.getString("cost"));
- item.setText(jObj.getString("item"));
- user.setText(jObj.getString("user"));
- preview_value.setText(jObj
- .getString("preview_type"));
- length.setText(jObj.getString("length"));
- String s = jObj.getString("thumbnail");
- Ion.with(getBaseContext()).load(s).withBitmap()
- .intoImageView(image);
- Log.d("item", item.toString());
- }
- } catch (JSONException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement