本文整理汇总了Java中com.nostra13.universalimageloader.core.assist.LoadedFrom类的典型用法代码示例。如果您正苦于以下问题:Java LoadedFrom类的具体用法?Java LoadedFrom怎么用?Java LoadedFrom使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
LoadedFrom类属于com.nostra13.universalimageloader.core.assist包,在下文中一共展示了LoadedFrom类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: display
import com.nostra13.universalimageloader.core.assist.LoadedFrom; //导入依赖的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.");
}
imageAware.setImageDrawable(new RoundedDrawable(bitmap, cornerRadius, margin));
if ((animateFromNetwork && loadedFrom == LoadedFrom.NETWORK) ||
(animateFromDisk && loadedFrom == LoadedFrom.DISC_CACHE) ||
(animateFromMemory && loadedFrom == LoadedFrom.MEMORY_CACHE)) {
animate(imageAware.getWrappedView(), durationMillis);
}
}
示例2: l
import com.nostra13.universalimageloader.core.assist.LoadedFrom; //导入依赖的package包/类
public l(i i1, k k1, Handler handler)
{
K = LoadedFrom.NETWORK;
z = i1;
A = k1;
B = handler;
C = i1.a;
D = C.p;
E = C.s;
F = C.t;
G = C.q;
a = k1.a;
H = k1.b;
b = k1.c;
I = k1.d;
c = k1.e;
d = k1.f;
e = k1.g;
J = c.a();
}
示例3: display
import com.nostra13.universalimageloader.core.assist.LoadedFrom; //导入依赖的package包/类
public void display(Bitmap bitmap, ImageAware imageaware, LoadedFrom loadedfrom)
{
if (!(imageaware instanceof ImageViewAware))
{
throw new IllegalArgumentException("ImageAware should wrap ImageView. ImageViewAware is expected.");
}
Bitmap bitmap1 = Util.clipToRoundBitmap(bitmap);
ImageView imageview = (ImageView)imageaware.getWrappedView();
if (bitmap1 == null || imageview == null)
{
return;
} else
{
imageview.setBackground(new BitmapDrawable(imageview.getResources(), bitmap1));
return;
}
}
示例4: display
import com.nostra13.universalimageloader.core.assist.LoadedFrom; //导入依赖的package包/类
@Override
public void display(Bitmap source, ImageAware imageAware, LoadedFrom loadedFrom) {
int sourceWidth = source.getWidth();
int sourceHeight = source.getHeight();
Rect target = CropViewExtensions.computeTargetSize(sourceWidth, sourceHeight, viewportWidth, viewportHeight);
final Bitmap result = Bitmap.createScaledBitmap(
source,
target.width(),
target.height(),
true);
if (result != source) {
source.recycle();
}
imageAware.setImageBitmap(result);
}
示例5: display
import com.nostra13.universalimageloader.core.assist.LoadedFrom; //导入依赖的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);
}
示例6: display
import com.nostra13.universalimageloader.core.assist.LoadedFrom; //导入依赖的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.");
}
imageAware.setImageDrawable(new RoundedDrawable(bitmap, cornerRadius, margin));
}
示例7: display
import com.nostra13.universalimageloader.core.assist.LoadedFrom; //导入依赖的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.");
}
imageAware.setImageDrawable(new RoundedVignetteDrawable(bitmap, cornerRadius, margin));
}
示例8: display
import com.nostra13.universalimageloader.core.assist.LoadedFrom; //导入依赖的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);
}
}
示例9: display
import com.nostra13.universalimageloader.core.assist.LoadedFrom; //导入依赖的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.");
}
imageAware.setImageDrawable(new CircleDrawable(bitmap, strokeColor, strokeWidth));
}
示例10: run
import com.nostra13.universalimageloader.core.assist.LoadedFrom; //导入依赖的package包/类
@Override
public void run() {
L.d(LOG_POSTPROCESS_IMAGE, imageLoadingInfo.memoryCacheKey);
BitmapProcessor processor = imageLoadingInfo.options.getPostProcessor();
Bitmap processedBitmap = processor.process(bitmap);
DisplayBitmapTask displayBitmapTask = new DisplayBitmapTask(processedBitmap, imageLoadingInfo, engine,
LoadedFrom.MEMORY_CACHE);
LoadAndDisplayImageTask.runTask(displayBitmapTask, imageLoadingInfo.options.isSyncLoading(), handler, engine);
}
示例11: DisplayBitmapTask
import com.nostra13.universalimageloader.core.assist.LoadedFrom; //导入依赖的package包/类
public DisplayBitmapTask(Bitmap bitmap, ImageLoadingInfo imageLoadingInfo, ImageLoaderEngine engine,
LoadedFrom loadedFrom) {
this.bitmap = bitmap;
imageUri = imageLoadingInfo.uri;
imageAware = imageLoadingInfo.imageAware;
memoryCacheKey = imageLoadingInfo.memoryCacheKey;
displayer = imageLoadingInfo.options.getDisplayer();
listener = imageLoadingInfo.listener;
this.engine = engine;
this.loadedFrom = loadedFrom;
}
示例12: display
import com.nostra13.universalimageloader.core.assist.LoadedFrom; //导入依赖的package包/类
public void display(Bitmap bitmap, ImageAware imageAware, LoadedFrom loadedFrom) {
if (imageAware instanceof ImageViewAware) {
imageAware.setImageDrawable(new RoundedDrawable(bitmap, this.cornerRadius, this.margin));
return;
}
throw new IllegalArgumentException("ImageAware should wrap ImageView. ImageViewAware is expected.");
}
示例13: display
import com.nostra13.universalimageloader.core.assist.LoadedFrom; //导入依赖的package包/类
public void display(Bitmap bitmap, ImageAware imageAware, LoadedFrom loadedFrom) {
if (imageAware instanceof ImageViewAware) {
imageAware.setImageDrawable(new RoundedVignetteDrawable(bitmap, this.cornerRadius, this.margin));
return;
}
throw new IllegalArgumentException("ImageAware should wrap ImageView. ImageViewAware is expected.");
}
示例14: DisplayBitmapTask
import com.nostra13.universalimageloader.core.assist.LoadedFrom; //导入依赖的package包/类
public DisplayBitmapTask(Bitmap bitmap, ImageLoadingInfo imageLoadingInfo, ImageLoaderEngine engine, LoadedFrom loadedFrom) {
this.bitmap = bitmap;
this.imageUri = imageLoadingInfo.uri;
this.imageAware = imageLoadingInfo.imageAware;
this.memoryCacheKey = imageLoadingInfo.memoryCacheKey;
this.displayer = imageLoadingInfo.options.getDisplayer();
this.listener = imageLoadingInfo.listener;
this.engine = engine;
this.loadedFrom = loadedFrom;
}
示例15: display
import com.nostra13.universalimageloader.core.assist.LoadedFrom; //导入依赖的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.");
}
imageAware.setImageDrawable(getImageDrawable(imageAware,bitmap));
}