Ejemplo n.º 1
0
 @Override
 public boolean onOptionsItemSelected(MenuItem item) {
   ImageDisplayer displayer = null;
   switch (item.getItemId()) {
     case 1:
       displayer =
           new ImageLoader.DefaultImageDisplayer(getResources().getDrawable(drawable.icon));
       break;
     case 2:
       displayer = new ImageLoader.DisplayShow();
       break;
     case 3:
       displayer = new MyDisplayer();
       break;
   }
   loader.startLoading(
       new LoadContext<String, ImageView, Bitmap>(
           "http://imgsrc.baidu.com/forum/pic/item/98052e976e39082654fb963f.jpg", imageView),
       displayer);
   return super.onOptionsItemSelected(item);
 }
Ejemplo n.º 2
0
 @Override
 protected void onDestroy() {
   super.onDestroy();
   loader.destroy(false);
 }