好的继续讲解Volley
Volley_JsonRequest与ImageRequest
//JsonRequest
public void buttonshow(View v) {
String url="你访问的服务器地址";
JsonObjectRequest request=new JsonObjectRequest(url, jsonRequest,new Listener<String>() {
@Override
public void onResponse(String response) {
// TODO Auto-generated method stub
System.out.println(response);
}
},new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
// TODO Auto-generated method stub
System.out.println(error);
}
});
}
网络请求库Volley详解转送门:http://www.jcodecraeer.com/a/anzhuokaifa/androidkaifa/2015/0526/2934.html