本文整理汇总了Java中com.nostra13.universalimageloader.core.imageaware.ImageAware.setImageBitmap方法的典型用法代码示例。如果您正苦于以下问题:Java ImageAware.setImageBitmap方法的具体用法?Java ImageAware.setImageBitmap怎么用?Java ImageAware.setImageBitmap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.nostra13.universalimageloader.core.imageaware.ImageAware
的用法示例。
在下文中一共展示了ImageAware.setImageBitmap方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: display
import com.nostra13.universalimageloader.core.imageaware.ImageAware; //导入方法依赖的package包/类
@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);
}
示例2: display
import com.nostra13.universalimageloader.core.imageaware.ImageAware; //导入方法依赖的package包/类
@Override
public void display(Bitmap bitmap, ImageAware imageAware, LoadedFrom loadedFrom) {
imageAware.setImageBitmap(bitmap);
if ((animateFromNetwork && loadedFrom == LoadedFrom.NETWORK) ||
(animateFromDisk && loadedFrom == LoadedFrom.DISC_CACHE) ||
(animateFromMemory && loadedFrom == LoadedFrom.MEMORY_CACHE)) {
animate(imageAware.getWrappedView(), durationMillis);
}
}
示例3: display
import com.nostra13.universalimageloader.core.imageaware.ImageAware; //导入方法依赖的package包/类
@Override
public void display(Bitmap bitmap, ImageAware imageAware, LoadedFrom loadedFrom, int fileTypeStatus, String filepath) {
if (!(imageAware instanceof ImageViewAware)) {
throw new IllegalArgumentException("ImageAware should wrap ImageView. ImageViewAware is expected.");
}
Bitmap roundedBitmap = roundCorners(bitmap, (ImageViewAware) imageAware, roundPixels);
imageAware.setImageBitmap(roundedBitmap);
}
示例4: display
import com.nostra13.universalimageloader.core.imageaware.ImageAware; //导入方法依赖的package包/类
@Override
public void display(Bitmap bitmap, ImageAware imageAware, LoadedFrom loadedFrom, int fileTypeStatus, String filepath) {
imageAware.setImageBitmap(bitmap);
if ((animateFromNetwork && loadedFrom == LoadedFrom.NETWORK) ||
(animateFromDisk && loadedFrom == LoadedFrom.DISC_CACHE) ||
(animateFromMemory && loadedFrom == LoadedFrom.MEMORY_CACHE)) {
animate(imageAware.getWrappedView(), durationMillis);
}
}
示例5: display
import com.nostra13.universalimageloader.core.imageaware.ImageAware; //导入方法依赖的package包/类
@Override
public void display(Bitmap bitmap, ImageAware imageAware, LoadedFrom loadedFrom, int fileTypeStatus, String filepath) {
if (fileTypeStatus == BitmapDisplayer.FILE_TYPE_GIF_IMAGE && !TextUtils.isEmpty(filepath)) {
try {
imageAware.setImageDrawable(new GifDrawable(filepath));
} catch (IOException e) {
imageAware.setImageBitmap(bitmap);
}
} else {
imageAware.setImageBitmap(bitmap);
}
}
示例6: display
import com.nostra13.universalimageloader.core.imageaware.ImageAware; //导入方法依赖的package包/类
public void display(Bitmap bitmap, ImageAware imageAware, LoadedFrom loadedFrom) {
imageAware.setImageBitmap(bitmap);
if ((this.animateFromNetwork && loadedFrom == LoadedFrom.NETWORK) || ((this
.animateFromDisk && loadedFrom == LoadedFrom.DISC_CACHE) || (this
.animateFromMemory && loadedFrom == LoadedFrom.MEMORY_CACHE))) {
animate(imageAware.getWrappedView(), this.durationMillis);
}
}
示例7: display
import com.nostra13.universalimageloader.core.imageaware.ImageAware; //导入方法依赖的package包/类
@Override
public void display(Bitmap bitmap, ImageAware imageAware, LoadedFrom loadedFrom) {
Bitmap output = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(), Bitmap.Config.ARGB_4444);
Canvas canvas = new Canvas(output);
final int color = 0xff424242;
final Paint paint = new Paint();
final Rect rect = new Rect(0, 0, bitmap.getWidth(), bitmap.getHeight());
paint.setAntiAlias(true);
canvas.drawARGB(0, 0, 0, 0);
paint.setColor(color);
//--CROP THE IMAGE
canvas.drawCircle(bitmap.getWidth() / 2, bitmap.getHeight() / 2, bitmap.getWidth() / 2 - 1, paint);
paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_IN));
canvas.drawBitmap(bitmap, rect, rect, paint);
//--ADD BORDER IF NEEDED
if(this.borderWidth > 0){
final Paint paint2 = new Paint();
paint2.setAntiAlias(true);
paint2.setColor(this.borderColor);
paint2.setStrokeWidth(this.borderWidth);
paint2.setStyle(Paint.Style.STROKE);
canvas.drawCircle(bitmap.getWidth() / 2, bitmap.getHeight() / 2, (float) (bitmap.getWidth() / 2 - Math.ceil(this.borderWidth / 2)), paint2);
}
imageAware.setImageBitmap(output);
}
示例8: display
import com.nostra13.universalimageloader.core.imageaware.ImageAware; //导入方法依赖的package包/类
@Override
public void display(Bitmap bitmap, ImageAware imageAware, LoadedFrom loadedFrom, int fileTypeStatus, String filepath) {
if (!(imageAware instanceof ImageViewAware)) {
throw new IllegalArgumentException("ImageAware should wrap ImageView. ImageViewAware is expected.");
}
Bitmap roundedBitmap = roundCorners(bitmap, (ImageViewAware) imageAware, roundPixels);
imageAware.setImageBitmap(roundedBitmap);
}
示例9: display
import com.nostra13.universalimageloader.core.imageaware.ImageAware; //导入方法依赖的package包/类
@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;
}
示例10: display
import com.nostra13.universalimageloader.core.imageaware.ImageAware; //导入方法依赖的package包/类
@Override
public void display(Bitmap bitmap, ImageAware imageAware, LoadedFrom loadedFrom) {
imageAware.setImageBitmap(bitmap);
}
示例11: display
import com.nostra13.universalimageloader.core.imageaware.ImageAware; //导入方法依赖的package包/类
public void display(Bitmap bitmap, ImageAware imageAware, LoadedFrom loadedFrom) {
imageAware.setImageBitmap(bitmap);
if ((this.animateFromNetwork && loadedFrom == LoadedFrom.NETWORK) || ((this.animateFromDisk && loadedFrom == LoadedFrom.DISC_CACHE) || (this.animateFromMemory && loadedFrom == LoadedFrom.MEMORY_CACHE))) {
animate(imageAware.getWrappedView(), this.durationMillis);
}
}
示例12: display
import com.nostra13.universalimageloader.core.imageaware.ImageAware; //导入方法依赖的package包/类
public void display(Bitmap bitmap, ImageAware imageAware, LoadedFrom loadedFrom) {
imageAware.setImageBitmap(bitmap);
}