Java 类com.nostra13.universalimageloader.core.assist.FailReason.FailType 实例源码

项目:mobile-manager-tool    文件:LoadAndDisplayImageTask.java   
private void fireFailEvent(final FailType failType, final Throwable failCause) {
    if (syncLoading || isTaskInterrupted() || isTaskNotActual()) return;
    Runnable r = new Runnable() {
        @Override
        public void run() {
            if (options.shouldShowImageOnFail()) {
                   Bitmap bitmapOnFaile = options.getImageBitmapOnFail(configuration.resources);
                   if (options.getDisplayer() instanceof RoundedBitmapDisplayer && bitmapOnFaile != null) {
                       int corner = ((RoundedBitmapDisplayer) options.getDisplayer()).getRoundedBitmapCorner();
                       if (corner != 0) {
                           imageAware.setImageDrawable(new RoundedBitmapDisplayer.RoundedDrawable(bitmapOnFaile, corner, 0));
                       }
                   } else {
                       imageAware.setImageDrawable(options.getImageOnFail(configuration.resources));
                   }
               }
               listener.onLoadingFailed(uri, imageAware.getWrappedView(), new FailReason(failType, failCause));
        }
    };
    runTask(r, false, handler, engine);
}
项目:Android-Universal-Image-Loader-Modify    文件:LoadAndDisplayImageTask.java   
/**
 * 图片加载失败事件处理分发
 * @param failType
 * @param failCause
 */
private void fireFailEvent(final FailType failType, final Throwable failCause) {
    if (syncLoading || isTaskInterrupted() || isTaskNotActual()) return;
    Runnable r = new Runnable() {
        @Override
        public void run() {
            if (options.shouldShowImageOnFail()) {
                //存在图片加载失败的占位图片配置,进行设置
                imageAware.setImageDrawable(options.getImageOnFail(configuration.resources));
            }
            //进行回调图片加载失败方法
            listener.onLoadingFailed(uri, imageAware.getWrappedView(), new FailReason(failType, failCause));
        }
    };
    //任务进行运行
    runTask(r, false, handler, engine);
}
项目:GitHub    文件:LoadAndDisplayImageTask.java   
private void fireFailEvent(final FailType failType, final Throwable failCause) {
    if (syncLoading || isTaskInterrupted() || isTaskNotActual()) return;
    Runnable r = new Runnable() {
        @Override
        public void run() {
            if (options.shouldShowImageOnFail()) {
                imageAware.setImageDrawable(options.getImageOnFail(configuration.resources));
            }
            listener.onLoadingFailed(uri, imageAware.getWrappedView(), new FailReason(failType, failCause));
        }
    };
    runTask(r, false, handler, engine);
}
项目:letv    文件:LoadAndDisplayImageTask.java   
private void fireFailEvent(final FailType failType, final Throwable failCause) {
    if (!this.syncLoading && !isTaskInterrupted() && !isTaskNotActual()) {
        runTask(new Runnable() {
            public void run() {
                if (LoadAndDisplayImageTask.this.options.shouldShowImageOnFail()) {
                    LoadAndDisplayImageTask.this.imageAware.setImageDrawable(LoadAndDisplayImageTask.this.options.getImageOnFail(LoadAndDisplayImageTask.this.configuration.resources));
                }
                LoadAndDisplayImageTask.this.listener.onLoadingFailed(LoadAndDisplayImageTask.this.uri, LoadAndDisplayImageTask.this.imageAware.getWrappedView(), new FailReason(failType, failCause));
            }
        }, false, this.handler, this.engine);
    }
}
项目:GifImageLoader    文件:LoadAndDisplayImageTask.java   
private void fireFailEvent(final FailType failType, final Throwable failCause) {
    if (syncLoading || isTaskInterrupted() || isTaskNotActual()) return;
    Runnable r = new Runnable() {
        @Override
        public void run() {
            if (options.shouldShowImageOnFail()) {
                imageAware.setImageDrawable(options.getImageOnFail(configuration.resources));
            }
            listener.onLoadingFailed(uri, imageAware.getWrappedView(), new FailReason(failType, failCause));
        }
    };
    runTask(r, false, handler, engine);
}
项目:ImageLoaderSupportGif    文件:LoadAndDisplayImageTask.java   
private void fireFailEvent(final FailType failType, final Throwable failCause) {
    if (syncLoading || isTaskInterrupted() || isTaskNotActual()) return;
    Runnable r = new Runnable() {
        @Override
        public void run() {
            if (options.shouldShowImageOnFail()) {
                imageAware.setImageDrawable(options.getImageOnFail(configuration.resources));
            }
            listener.onLoadingFailed(uri, imageAware.getWrappedView(), new FailReason(failType, failCause));
        }
    };
    runTask(r, false, handler, engine);
}
项目:yun2win-sdk-android    文件:LoadAndDisplayImageTask.java   
private void fireFailEvent(final FailType failType, final Throwable failCause) {
    if (syncLoading || isTaskInterrupted() || isTaskNotActual()) return;
    Runnable r = new Runnable() {
        @Override
        public void run() {
            if (options.shouldShowImageOnFail()) {
                imageAware.setImageDrawable(options.getImageOnFail(configuration.resources));
            }
            listener.onLoadingFailed(uri, imageAware.getWrappedView(), new FailReason(failType, failCause));
        }
    };
    runTask(r, false, handler, engine);
}
项目:android-open-project-demo-master    文件:LoadAndDisplayImageTask.java   
private void fireFailEvent(final FailType failType, final Throwable failCause) {
    if (syncLoading || isTaskInterrupted() || isTaskNotActual()) return;
    Runnable r = new Runnable() {
        @Override
        public void run() {
            if (options.shouldShowImageOnFail()) {
                imageAware.setImageDrawable(options.getImageOnFail(configuration.resources));
            }
            listener.onLoadingFailed(uri, imageAware.getWrappedView(), new FailReason(failType, failCause));
        }
    };
    runTask(r, false, handler, engine);
}
项目:BigApp_WordPress_Android    文件:LoadAndDisplayImageTask.java   
private void fireFailEvent(final FailType failType, final Throwable failCause) {
    if (syncLoading || isTaskInterrupted() || isTaskNotActual()) return;
    Runnable r = new Runnable() {
        @Override
        public void run() {
            if (options.shouldShowImageOnFail()) {
                imageAware.setImageDrawable(options.getImageOnFail(configuration.resources));
            }
            listener.onLoadingFailed(uri, imageAware.getWrappedView(), new FailReason(failType, failCause));
        }
    };
    runTask(r, false, handler, engine);
}
项目:AyoSunny    文件:LoadAndDisplayImageTask.java   
private void fireFailEvent(final FailType failType, final Throwable failCause) {
    if (syncLoading || isTaskInterrupted() || isTaskNotActual()) return;
    Runnable r = new Runnable() {
        @Override
        public void run() {
            if (options.shouldShowImageOnFail()) {
                imageAware.setImageDrawable(options.getImageOnFail(configuration.resources));
            }
            listener.onLoadingFailed(uri, imageAware.getWrappedView(), new FailReason(failType, failCause));
        }
    };
    runTask(r, false, handler, engine);
}
项目:WliveTV    文件:LoadAndDisplayImageTask.java   
private void fireFailEvent(final FailType failType, final Throwable failCause) {
    if (syncLoading || isTaskInterrupted() || isTaskNotActual()) return;
    Runnable r = new Runnable() {
        @Override
        public void run() {
            if (options.shouldShowImageOnFail()) {
                imageAware.setImageDrawable(options.getImageOnFail(configuration.resources));
            }
            listener.onLoadingFailed(uri, imageAware.getWrappedView(), new FailReason(failType, failCause));
        }
    };
    runTask(r, false, handler, engine);
}
项目:EveryXDay    文件:LoadAndDisplayImageTask.java   
private void fireFailEvent(final FailType failType, final Throwable failCause) {
    if (syncLoading || isTaskInterrupted() || isTaskNotActual()) return;
    Runnable r = new Runnable() {
        @Override
        public void run() {
            if (options.shouldShowImageOnFail()) {
                imageAware.setImageDrawable(options.getImageOnFail(configuration.resources));
            }
            listener.onLoadingFailed(uri, imageAware.getWrappedView(), new FailReason(failType, failCause));
        }
    };
    runTask(r, false, handler, engine);
}
项目:https-github.com-nostra13-Android-Universal-Image-Loader    文件:LoadAndDisplayImageTask.java   
private void fireFailEvent(final FailType failType, final Throwable failCause) {
    if (syncLoading || isTaskInterrupted() || isTaskNotActual()) return;
    Runnable r = new Runnable() {
        @Override
        public void run() {
            if (options.shouldShowImageOnFail()) {
                imageAware.setImageDrawable(options.getImageOnFail(configuration.resources));
            }
            listener.onLoadingFailed(uri, imageAware.getWrappedView(), new FailReason(failType, failCause));
        }
    };
    runTask(r, false, handler, engine);
}
项目:CouldBooks    文件:LoadAndDisplayImageTask.java   
private void fireFailEvent(final FailType failType, final Throwable failCause) {
    if (syncLoading || isTaskInterrupted() || isTaskNotActual()) return;
    Runnable r = new Runnable() {
        @Override
        public void run() {
            if (options.shouldShowImageOnFail()) {
                imageAware.setImageDrawable(options.getImageOnFail(configuration.resources));
            }
            listener.onLoadingFailed(uri, imageAware.getWrappedView(), new FailReason(failType, failCause));
        }
    };
    runTask(r, false, handler, engine);
}
项目:andoridDome    文件:LoadAndDisplayImageTask.java   
private void fireFailEvent(final FailType failType, final Throwable failCause) {
    if (syncLoading || isTaskInterrupted() || isTaskNotActual()) return;
    Runnable r = new Runnable() {
        @Override
        public void run() {
            if (options.shouldShowImageOnFail()) {
                imageAware.setImageDrawable(options.getImageOnFail(configuration.resources));
            }
            listener.onLoadingFailed(uri, imageAware.getWrappedView(), new FailReason(failType, failCause));
        }
    };
    runTask(r, false, handler, engine);
}
项目:Nepenthes-Android    文件:LoadAndDisplayImageTask.java   
private void fireFailEvent(final FailType failType, final Throwable failCause) {
    if (syncLoading || isTaskInterrupted() || isTaskNotActual()) return;
    Runnable r = new Runnable() {
        @Override
        public void run() {
            if (options.shouldShowImageOnFail()) {
                imageAware.setImageDrawable(options.getImageOnFail(configuration.resources));
            }
            listener.onLoadingFailed(uri, imageAware.getWrappedView(), new FailReason(failType, failCause));
        }
    };
    runTask(r, false, handler, engine);
}
项目:morse    文件:LoadAndDisplayImageTask.java   
private void fireFailEvent(final FailType failType, final Throwable failCause) {
    if (options.isSyncLoading() || isTaskInterrupted() || isTaskNotActual()) return;
    handler.post(new Runnable() {
        @Override
        public void run() {
            if (options.shouldShowImageOnFail()) {
                imageAware.setImageDrawable(options.getImageOnFail(configuration.resources));
            }
            listener.onLoadingFailed(uri, imageAware.getWrappedView(), new FailReason(failType, failCause));
        }
    });
}
项目:juahya    文件:LoadAndDisplayImageTask.java   
private void fireImageLoadingFailedEvent(final FailType failType, final Throwable failCause) {
    if (!Thread.interrupted()) {
        handler.post(new Runnable() {
            @Override
            public void run() {
                if (options.shouldShowImageOnFail()) {
                    imageView.setImageResource(options.getImageOnFail());
                }
                listener.onLoadingFailed(uri, imageView, new FailReason(failType, failCause));
            }
        });
    }
}
项目:OnTheRoad    文件:LoadAndDisplayImageTask.java   
private void fireFailEvent(final FailType failType, final Throwable failCause) {
    if (syncLoading || isTaskInterrupted() || isTaskNotActual()) return;
    Runnable r = new Runnable() {
        @Override
        public void run() {
            if (options.shouldShowImageOnFail()) {
                imageAware.setImageDrawable(options.getImageOnFail(configuration.resources));
            }
            listener.onLoadingFailed(uri, imageAware.getWrappedView(), new FailReason(failType, failCause));
        }
    };
    runTask(r, false, handler, engine);
}
项目:danmaku-project    文件:LoadAndDisplayImageTask.java   
private void fireFailEvent(final FailType failType, final Throwable failCause) {
    if (syncLoading || isTaskInterrupted() || isTaskNotActual()) return;
    Runnable r = new Runnable() {
        @Override
        public void run() {
            if (options.shouldShowImageOnFail()) {
                imageAware.setImageDrawable(options.getImageOnFail(configuration.resources));
            }
            listener.onLoadingFailed(uri, imageAware.getWrappedView(), new FailReason(failType, failCause));
        }
    };
    runTask(r, false, handler, engine);
}
项目:android-open-project-demo    文件:LoadAndDisplayImageTask.java   
private void fireFailEvent(final FailType failType, final Throwable failCause) {
    if (syncLoading || isTaskInterrupted() || isTaskNotActual()) return;
    Runnable r = new Runnable() {
        @Override
        public void run() {
            if (options.shouldShowImageOnFail()) {
                imageAware.setImageDrawable(options.getImageOnFail(configuration.resources));
            }
            listener.onLoadingFailed(uri, imageAware.getWrappedView(), new FailReason(failType, failCause));
        }
    };
    runTask(r, false, handler, engine);
}
项目:letv    文件:LoadAndDisplayImageTask.java   
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;
}
项目:boohee_v5.6    文件:LoadAndDisplayImageTask.java   
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;
}
项目:boohee_v5.6    文件:LoadAndDisplayImageTask.java   
private void fireFailEvent(FailType failType, Throwable failCause) {
    if (!this.syncLoading && !isTaskInterrupted() && !isTaskNotActual()) {
        runTask(new 2 (this, failType, failCause),false, this.handler, this.engine);
    }
}