本文整理汇总了Java中com.nostra13.universalimageloader.core.assist.LoadedFrom.NETWORK属性的典型用法代码示例。如果您正苦于以下问题:Java LoadedFrom.NETWORK属性的具体用法?Java LoadedFrom.NETWORK怎么用?Java LoadedFrom.NETWORK使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.nostra13.universalimageloader.core.assist.LoadedFrom
的用法示例。
在下文中一共展示了LoadedFrom.NETWORK属性的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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.");
}
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
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
@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);
}
}
示例4: display
@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
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);
}
}
示例6: display
public void display(Bitmap bitmap, ImageAware imageaware, LoadedFrom loadedfrom)
{
imageaware.setImageBitmap(bitmap);
if (b && loadedfrom == LoadedFrom.NETWORK || c && loadedfrom == LoadedFrom.DISC_CACHE || d && loadedfrom == LoadedFrom.MEMORY_CACHE)
{
animate(imageaware.getWrappedView(), a);
}
}
示例7: display
/**
* 图片进行显示在ImageAware中
* @param bitmap 原图片
* @param imageAware 显示进行显示图片的控件 {@linkplain com.nostra13.universalimageloader.core.imageaware.ImageAware Image aware view} to
* display Bitmap
* @param loadedFrom Source of loaded image 图片来源方式
*/
@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);
}
}
示例8: display
@Override
public void display(Bitmap bitmap, ImageAware imageAware, LoadedFrom loadedFrom) {
imageAware.setImageBitmap(bitmap);
if ((animateFromNetwork && loadedFrom == LoadedFrom.NETWORK) ||
(animateFromDisc && loadedFrom == LoadedFrom.DISC_CACHE) ||
(animateFromMemory && loadedFrom == LoadedFrom.MEMORY_CACHE)) {
animate(imageAware.getWrappedView(), durationMillis);
}
}
示例9: display
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);
}
}
示例10: tryLoadBitmap
private Bitmap tryLoadBitmap() throws TaskCancelledException {
Bitmap bitmap = null;
if (this.thumbnailUtils != null && this.uri.startsWith("LetvThumbnailUtils")) {
bitmap = this.thumbnailUtils.getThumbnailBitmap(this.uri.replace("LetvThumbnailUtils", ""));
if (bitmap != null) {
return bitmap;
}
}
try {
File imageFile = this.configuration.diskCache.get(this.uri);
if (imageFile != null && imageFile.exists()) {
L.d(LOG_LOAD_IMAGE_FROM_DISK_CACHE, this.memoryCacheKey);
this.loadedFrom = LoadedFrom.DISC_CACHE;
checkTaskNotActual();
bitmap = decodeImage(Scheme.FILE.wrap(imageFile.getAbsolutePath()));
}
if (bitmap == null || bitmap.getWidth() <= 0 || bitmap.getHeight() <= 0) {
L.d(LOG_LOAD_IMAGE_FROM_NETWORK, this.memoryCacheKey);
this.loadedFrom = LoadedFrom.NETWORK;
String imageUriForDecoding = this.uri;
if (this.options.isCacheOnDisk() && tryCacheImageOnDisk()) {
imageFile = this.configuration.diskCache.get(this.uri);
if (imageFile != null) {
imageUriForDecoding = Scheme.FILE.wrap(imageFile.getAbsolutePath());
}
}
checkTaskNotActual();
bitmap = decodeImage(imageUriForDecoding);
if (bitmap == null || bitmap.getWidth() <= 0 || bitmap.getHeight() <= 0) {
fireFailEvent(FailType.DECODING_ERROR, null);
}
}
} catch (IllegalStateException e) {
fireFailEvent(FailType.NETWORK_DENIED, null);
} catch (TaskCancelledException e2) {
throw e2;
} catch (IOException e3) {
L.e(e3);
fireFailEvent(FailType.IO_ERROR, e3);
} catch (OutOfMemoryError e4) {
L.e(e4);
fireFailEvent(FailType.OUT_OF_MEMORY, e4);
} catch (Throwable e5) {
L.e(e5);
fireFailEvent(FailType.UNKNOWN, e5);
}
return bitmap;
}
示例11: tryLoadBitmap
private Bitmap tryLoadBitmap() throws TaskCancelledException {
Bitmap bitmap = null;
try {
File imageFile = this.configuration.diskCache.get(this.uri);
if (imageFile != null && imageFile.exists() && imageFile.length() > 0) {
L.d(LOG_LOAD_IMAGE_FROM_DISK_CACHE, this.memoryCacheKey);
this.loadedFrom = LoadedFrom.DISC_CACHE;
checkTaskNotActual();
bitmap = decodeImage(Scheme.FILE.wrap(imageFile.getAbsolutePath()));
}
if (bitmap == null || bitmap.getWidth() <= 0 || bitmap.getHeight() <= 0) {
L.d(LOG_LOAD_IMAGE_FROM_NETWORK, this.memoryCacheKey);
this.loadedFrom = LoadedFrom.NETWORK;
String imageUriForDecoding = this.uri;
if (this.options.isCacheOnDisk() && tryCacheImageOnDisk()) {
imageFile = this.configuration.diskCache.get(this.uri);
if (imageFile != null) {
imageUriForDecoding = Scheme.FILE.wrap(imageFile.getAbsolutePath());
}
}
checkTaskNotActual();
bitmap = decodeImage(imageUriForDecoding);
if (bitmap == null || bitmap.getWidth() <= 0 || bitmap.getHeight() <= 0) {
fireFailEvent(FailType.DECODING_ERROR, null);
}
}
} catch (IllegalStateException e) {
fireFailEvent(FailType.NETWORK_DENIED, null);
} catch (TaskCancelledException e2) {
throw e2;
} catch (IOException e3) {
L.e(e3);
fireFailEvent(FailType.IO_ERROR, e3);
} catch (OutOfMemoryError e4) {
L.e(e4);
fireFailEvent(FailType.OUT_OF_MEMORY, e4);
} catch (Throwable e5) {
L.e(e5);
fireFailEvent(FailType.UNKNOWN, e5);
}
return bitmap;
}