use of com.nostra13.universalimageloader.core.imageaware.ImageViewAware in project PhotoNoter by yydcdut.
the class CircleBitmapDisplayer method display.
@Override
public void display(Bitmap bitmap, ImageAware imageAware, LoadedFrom loadedFrom) {
if (!(imageAware instanceof ImageViewAware)) {
throw new IllegalArgumentException("ImageAware should wrap ImageView. ImageViewAware is expected.");
}
Bitmap roundedBitmap = roundCorners(bitmap, (ImageViewAware) imageAware);
imageAware.setImageBitmap(roundedBitmap);
return;
}
use of com.nostra13.universalimageloader.core.imageaware.ImageViewAware in project GalleryFinal by pengjianbo.
the class UILImageLoader method displayImage.
@Override
public void displayImage(Activity activity, String path, GFImageView imageView, Drawable defaultDrawable, int width, int height) {
DisplayImageOptions options = new DisplayImageOptions.Builder().cacheOnDisk(false).cacheInMemory(false).bitmapConfig(mImageConfig).build();
ImageSize imageSize = new ImageSize(width, height);
ImageLoader.getInstance().displayImage("file://" + path, new ImageViewAware(imageView), options, imageSize, null, null);
}
use of com.nostra13.universalimageloader.core.imageaware.ImageViewAware in project Android-Universal-Image-Loader by nostra13.
the class ImageSizeTest method setUp.
@Before
public void setUp() throws Exception {
mActivity = new Activity();
// Make and set view with some prelim values to test
mView = new TestImageView(mActivity);
mView.setLayoutParams(new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
mView.measure(View.MeasureSpec.makeMeasureSpec(250, View.MeasureSpec.EXACTLY), View.MeasureSpec.makeMeasureSpec(250, View.MeasureSpec.EXACTLY));
mImageAware = new ImageViewAware(mView);
}
use of com.nostra13.universalimageloader.core.imageaware.ImageViewAware in project Android-Universal-Image-Loader by nostra13.
the class OldRoundedBitmapDisplayer method display.
@Override
public void display(Bitmap bitmap, ImageAware imageAware, LoadedFrom loadedFrom) {
if (!(imageAware instanceof ImageViewAware)) {
throw new IllegalArgumentException("ImageAware should wrap ImageView. ImageViewAware is expected.");
}
Bitmap roundedBitmap = roundCorners(bitmap, (ImageViewAware) imageAware, roundPixels);
imageAware.setImageBitmap(roundedBitmap);
}
Aggregations