StringRequest request = new StringRequest(host, new Listener<String>() { @Override public void onResponse(String response) { Logg.logg("请求成功运行 "); // 输出结果 。。。。。 Logg.logg(response); } }, new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { Logg.logg("请求错误运行 "); } }); queue.add(request ); queue.start() ;获取json
JsonObjectRequest objectRequest = new JsonObjectRequest(json, null, new Response.Listener<JSONObject>() { @Override public void onResponse(JSONObject response) { Logg.logg(response.toString()); } }, null); queue.add(objectRequest ); queue.start() ;从网络加载图片不要用imageview ,而要用NetWorkImageView .. 并且要实现imagecache ..建议 .
原文地址:http://blog.csdn.net/u014781439/article/details/42388019