当前位置: 首页>>代码示例>>Java>>正文


Java ImageAware.setImageBitmap方法代码示例

本文整理汇总了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);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:9,代码来源:OldRoundedBitmapDisplayer.java

示例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);
	}
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:11,代码来源:FadeInBitmapDisplayer.java

示例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);
}
 
开发者ID:Spencer231,项目名称:GifImageLoader,代码行数:9,代码来源:OldRoundedBitmapDisplayer.java

示例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);
	}
}
 
开发者ID:Spencer231,项目名称:GifImageLoader,代码行数:10,代码来源:FadeInBitmapDisplayer.java

示例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);
    }
}
 
开发者ID:Spencer231,项目名称:GifImageLoader,代码行数:13,代码来源:SimpleBitmapDisplayer.java

示例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);
    }
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:9,代码来源:FadeInBitmapDisplayer.java

示例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);
}
 
开发者ID:ccfish86,项目名称:sctalk,代码行数:31,代码来源:CircleBitmapDisplayer.java

示例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);
}
 
开发者ID:siwangqishiq,项目名称:ImageLoaderSupportGif,代码行数:9,代码来源:OldRoundedBitmapDisplayer.java

示例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;
}
 
开发者ID:fanwucoder,项目名称:mvpChat,代码行数:10,代码来源:CircleBitmapDisplayer.java

示例10: display

import com.nostra13.universalimageloader.core.imageaware.ImageAware; //导入方法依赖的package包/类
@Override
public void display(Bitmap bitmap, ImageAware imageAware, LoadedFrom loadedFrom) {
	imageAware.setImageBitmap(bitmap);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:5,代码来源:SimpleBitmapDisplayer.java

示例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);
    }
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:7,代码来源:FadeInBitmapDisplayer.java

示例12: display

import com.nostra13.universalimageloader.core.imageaware.ImageAware; //导入方法依赖的package包/类
public void display(Bitmap bitmap, ImageAware imageAware, LoadedFrom loadedFrom) {
    imageAware.setImageBitmap(bitmap);
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:4,代码来源:SimpleBitmapDisplayer.java


注:本文中的com.nostra13.universalimageloader.core.imageaware.ImageAware.setImageBitmap方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。