AndroidBase 使用AbImageLoader異步加載顯示圖片

//圖片的下載
AbImageLoader mAbImageLoader = AbImageLoader.newInstance(this);
mAbImageLoader.setLoadingImage(R.drawable.image_loading);
mAbImageLoader.setErrorImage(R.drawable.image_error);
mAbImageLoader.setEmptyImage(R.drawable.image_empty);

//原圖片的下載
mAbImageLoader.setMaxWidth(0);
mAbImageLoader.setMaxHeight(0);
mAbImageLoader.display(img01,imageUrl);

//縮放圖片的下載
(保持寬高比,計算縮放比例,使一個方向縮放後,另一方向不小與顯示的大小的最合適比例)
mAbImageLoader.setMaxWidth(150);
mAbImageLoader.setMaxHeight(150);
mAbImageLoader.display(img02,imageUrl2);

//放大圖片
mAbImageLoader.setMaxWidth(180);
mAbImageLoader.setMaxHeight(180);
mAbImageLoader.display(img03,imageUrl3);

來源:http://www.amsoft.cn/post-112.html
便於自己查找!

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章