Java Code Examples for com.nostra13.universalimageloader.core.assist.LoadedFrom#NETWORK

The following examples show how to use com.nostra13.universalimageloader.core.assist.LoadedFrom#NETWORK . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: l.java    From MiBandDecompiled with Apache License 2.0 6 votes vote down vote up
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();
}
 
Example 2
Source File: FadeInBitmapDisplayer.java    From candybar with Apache License 2.0 5 votes vote down vote up
@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);
    }
}
 
Example 3
Source File: FadeInBitmapDisplayer.java    From mobile-manager-tool with MIT License 5 votes vote down vote up
@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);
	}
}
 
Example 4
Source File: FadeInBitmapDisplayer.java    From BigApp_WordPress_Android with Apache License 2.0 5 votes vote down vote up
@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);
	}
}
 
Example 5
Source File: FadeInBitmapDisplayer.java    From WliveTV with Apache License 2.0 5 votes vote down vote up
@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);
	}
}
 
Example 6
Source File: FadeInBitmapDisplayer.java    From MiBandDecompiled with Apache License 2.0 5 votes vote down vote up
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);
    }
}
 
Example 7
Source File: FadeInBitmapDisplayer.java    From Android-Universal-Image-Loader-Modify with Apache License 2.0 5 votes vote down vote up
/**
 * 图片进行显示在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);
	}
}
 
Example 8
Source File: FadeInBitmapDisplayer.java    From android-open-project-demo with Apache License 2.0 5 votes vote down vote up
@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);
	}
}
 
Example 9
Source File: FadeInBitmapDisplayer.java    From letv with Apache License 2.0 4 votes vote down vote up
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);
    }
}
 
Example 10
Source File: LoadAndDisplayImageTask.java    From letv with Apache License 2.0 4 votes vote down vote up
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;
}