并将该值设置为文本视图
JsonObjectRequest req = new JsonObjectRequest(Request.Method.GET, url, null,
new Response.Listener<JSONObject>() {
public void onResponse(JSONObject response) {
try {
JSONObject object1 = response.getJSONObject("liveMapResponseVO");
JSONArray jsonArray = object1.getJSONArray("locations");
for(int i=0; i<jsonArray.length(); i++){
JSONObject jsonObject = (JSONObject) jsonArray.get(i);
Movie movie = new Movie();
movie.setTitle(jsonObject.getString("vehicleName"));
movie.setRating(jsonObject.getString("speed"));
movie.setGenre(jsonObject.getString("stopTime"));
movie.setYear(jsonObject.getString("idleTime"));
Log.d(TAG, jsonObject.getString("vehicleName"));
movieList.add(movie);
}
pDialog.hide();
} catch (JSONException e) {
e.printStackTrace();
}
adapter.notifyDataSetChanged();
}