private Button myBtn;private ImageView myImageView;private ImageLoader imageLoader;private RequestQueue requestQueue;@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.activity_image_loader);requestQueue= Volley.newRequestQueue(getApplicationContext());//请求队列imageLoader=new ImageLoader(requestQueue, new BitmapCache());myBtn= (Button) findViewById(R.id.myImageLoaderBtn);myImageView=(ImageView)findViewById(R.id.myImageLoader);myBtn.setOnClickListener(new View.OnClickListener() {@Overridepublic void onClick(View v) {ImageLoader.ImageListener listener = ImageLoader.getImageListener(myImageView,R.drawable.ic_launcher, R.drawable.ic_launcher);//后两个参数分别是加载的默认图和加载出错后要显示的图片imageLoader.get(":8080/JerehEdu/image/logo.jpg", listener,200,200);}});}
,那么,不如我们礼貌地保持相对距离,不至于太冷,不至于太痛。