JSONObject Jsonobject
JSONObject Jsonobject
txtday.setText(Day);
JSONArray jsonArrayWeather =
jsonobject.getJSONArray("weather");
JSONObject jsonObjectweather =
jsonArrayWeather.getJSONObject(0);
String status = jsonObjectweather.getString("main");
String icon = jsonObjectweather.getString("icon");
Picasso.get().load("http://openweathermap.org/img/wn/"+icon+".png").into(ImgIcon);
txtstatus.setText(status);
JSONObject jsonObjectMain =
jsonobject.getJSONObject("main");
String nhietdo= jsonObjectMain.getString("temp");
String doam = jsonObjectMain.getString("humidity");
Double a= Double.valueOf(nhietdo);
String Nhietdo = String.valueOf(a.intValue());
txttemp.setText(nhietdo+"C");
txthumidity.setText(doam+"%");