com.nostra13.universalimageloader.core.assist.FailReason Java Examples

The following examples show how to use com.nostra13.universalimageloader.core.assist.FailReason. 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: LoadAndDisplayImageTask.java    From Android-Universal-Image-Loader-Modify with Apache License 2.0 6 votes vote down vote up
/**
 * 图片加载失败事件处理分发
 * @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);
}
 
Example #2
Source File: n.java    From MiBandDecompiled with Apache License 2.0 5 votes vote down vote up
public void run()
{
    if (c.c.shouldShowImageOnFail())
    {
        c.b.setImageDrawable(c.c.getImageOnFail(l.a(c).a));
    }
    c.d.onLoadingFailed(c.a, c.b.getWrappedView(), new FailReason(a, b));
}
 
Example #3
Source File: LoadAndDisplayImageTask.java    From WliveTV with Apache License 2.0 5 votes vote down vote up
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);
}
 
Example #4
Source File: MediaPreviewCameraActivity.java    From BigApp_WordPress_Android with Apache License 2.0 5 votes vote down vote up
@Override
public void onLoadingFailed(String imageUri, View view,
                            FailReason failReason) {
    mImageView.setScaleType(ImageView.ScaleType.CENTER);
    mProgress.setVisibility(View.GONE);
    PhotoViewAttacher photo = new PhotoViewAttacher(mImageView);
    photo.setMaxScale(8);
}
 
Example #5
Source File: MediaDetailFragment.java    From BigApp_WordPress_Android with Apache License 2.0 5 votes vote down vote up
@Override
public void onLoadingFailed(String imageUri, View view,
		FailReason failReason) {
	mImageView.setScaleType(ImageView.ScaleType.CENTER);
	mProgress.setVisibility(View.GONE);
	PhotoViewAttacher photo = new PhotoViewAttacher(mImageView);
	photo.setMaxScale(8);
	photo.setOnPhotoTapListener(this);
	photo.setOnViewTapListener(this);
}
 
Example #6
Source File: LoadAndDisplayImageTask.java    From BigApp_WordPress_Android with Apache License 2.0 5 votes vote down vote up
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);
}
 
Example #7
Source File: n.java    From MiBandDecompiled with Apache License 2.0 5 votes vote down vote up
n(l l1, com.nostra13.universalimageloader.core.assist.FailReason.FailType failtype, Throwable throwable)
{
    c = l1;
    a = failtype;
    b = throwable;
    super();
}
 
Example #8
Source File: LoadAndDisplayImageTask.java    From letv with Apache License 2.0 5 votes vote down vote up
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);
    }
}
 
Example #9
Source File: ApngImageLoadingListener.java    From apng-view with Apache License 2.0 5 votes vote down vote up
@Override
public void onLoadingFailed(String imageUri, View view, FailReason failReason) {
    if (view == null) return;

    Object tag = view.getTag(R.id.tag_image);
    if (enableDebugLog) FLog.d("tag: %s", tag);

    view.setTag(R.id.tag_image, null);

    if (shouldForward()) callback.onLoadFinish(false, imageUri, view);
}
 
Example #10
Source File: DemoActivity.java    From Masaccio with Apache License 2.0 5 votes vote down vote up
@Override
public void onLoadingFailed(final String imageUri, final View view,
                            final FailReason failReason) {

    final DemoActivity demoActivity = mActivityReference.get();

    if (demoActivity != null) {

        Toast.makeText(demoActivity, "Error during image loading", Toast.LENGTH_SHORT)
                .show();
        demoActivity.mProgressBar.setVisibility(View.GONE);
    }
}
 
Example #11
Source File: LoadAndDisplayImageTask.java    From android-open-project-demo with Apache License 2.0 5 votes vote down vote up
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);
}
 
Example #12
Source File: LoadAndDisplayImageTask.java    From candybar with Apache License 2.0 5 votes vote down vote up
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.context));
            }
            listener.onLoadingFailed(uri, imageAware.getWrappedView(), new FailReason(failType, failCause));
        }
    };
    runTask(r, false, handler, engine);
}
 
Example #13
Source File: SimpleImageLoadingListener.java    From candybar with Apache License 2.0 4 votes vote down vote up
@Override
public void onLoadingFailed(String imageUri, View view, FailReason failReason) {
    // Empty implementation
}
 
Example #14
Source File: FeatureImage.java    From fdroidclient with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void onLoadingFailed(String imageUri, View view, FailReason failReason) {
}
 
Example #15
Source File: SimpleImageLoadingListener.java    From MiBandDecompiled with Apache License 2.0 4 votes vote down vote up
public void onLoadingFailed(String s, View view, FailReason failreason)
{
}
 
Example #16
Source File: BlurImageView.java    From BlurImageView with Apache License 2.0 4 votes vote down vote up
@Override
public void onLoadingFailed(String imageUri, View view, FailReason failReason) {
  imageView.setImageDrawable(failDrawable);
  Log.e("Image Load error", "cannot load Small image, please check url or network status");
}
 
Example #17
Source File: FromURLActivity.java    From KenBurnsView with Apache License 2.0 4 votes vote down vote up
@Override
public void onLoadingFailed(String imageUri, View view, FailReason failReason) {
    Toast.makeText(getApplicationContext(), "Failed to load image.", Toast.LENGTH_SHORT).show();
}
 
Example #18
Source File: BlurImageView.java    From BlurImageView with Apache License 2.0 4 votes vote down vote up
@Override
public void onLoadingFailed(String imageUri, View view, FailReason failReason) {
  imageView.setImageDrawable(failDrawable);
}
 
Example #19
Source File: SimpleImageLoadingListener.java    From WliveTV with Apache License 2.0 4 votes vote down vote up
@Override
public void onLoadingFailed(String imageUri, View view, FailReason failReason) {
	// Empty implementation
}
 
Example #20
Source File: SimpleImageLoadingListener.java    From android-open-project-demo with Apache License 2.0 4 votes vote down vote up
@Override
public void onLoadingFailed(String imageUri, View view, FailReason failReason) {
	// Empty implementation
}
 
Example #21
Source File: SimpleImageLoadingListener.java    From BigApp_WordPress_Android with Apache License 2.0 4 votes vote down vote up
@Override
public void onLoadingFailed(String imageUri, View view, FailReason failReason) {
	// Empty implementation
}
 
Example #22
Source File: SimpleImageLoadingListener.java    From mobile-manager-tool with MIT License 4 votes vote down vote up
@Override
public void onLoadingFailed(String imageUri, View view, FailReason failReason) {
	// Empty implementation
}
 
Example #23
Source File: DokitImageLoadingListener.java    From DoraemonKit with Apache License 2.0 4 votes vote down vote up
@Override
public void onLoadingFailed(String imageUri, View view, FailReason failReason) {
    if (mOriginalImageLoadingListener != null) {
        mOriginalImageLoadingListener.onLoadingFailed(imageUri, view, failReason);
    }
}
 
Example #24
Source File: PushNotificationReceiver.java    From aptoide-client with GNU General Public License v2.0 4 votes vote down vote up
@Override
        public void onLoadingFailed(String imageUri, View view, FailReason failReason) {
//            Log.i("PushNotificationReceiver", "onLoadingFailed");
            loadNotification(extra, context);
        }
 
Example #25
Source File: AdapterMusic.java    From DMAudioStreamer with Apache License 2.0 4 votes vote down vote up
@Override
public void onLoadingFailed(String imageUri, View view, FailReason failReason) {
    progressEvent(view, true);
}
 
Example #26
Source File: SimpleImageLoadingListener.java    From letv with Apache License 2.0 4 votes vote down vote up
public void onLoadingFailed(String imageUri, View view, FailReason failReason) {
}
 
Example #27
Source File: MusicActivity.java    From DMAudioStreamer with Apache License 2.0 4 votes vote down vote up
@Override
public void onLoadingFailed(String imageUri, View view, FailReason failReason) {
    progressEvent(view, true);
}
 
Example #28
Source File: SimpleImageLoadingListener.java    From Android-Universal-Image-Loader-Modify with Apache License 2.0 2 votes vote down vote up
/**
 * 图片加载失败回调
 * @param imageUri   Loading image URI
 * @param view       View for image. Can be <b>null</b>.
 * @param failReason {@linkplain com.nostra13.universalimageloader.core.assist.FailReason The reason} why image
 */
@Override
public void onLoadingFailed(String imageUri, View view, FailReason failReason) {
	// Empty implementation
}
 
Example #29
Source File: ImageLoadingListener.java    From android-open-project-demo with Apache License 2.0 2 votes vote down vote up
/**
 * Is called when an error was occurred during image loading
 *
 * @param imageUri   Loading image URI
 * @param view       View for image. Can be <b>null</b>.
 * @param failReason {@linkplain com.nostra13.universalimageloader.core.assist.FailReason The reason} why image
 *                   loading was failed
 */
void onLoadingFailed(String imageUri, View view, FailReason failReason);
 
Example #30
Source File: ImageLoadingListener.java    From candybar with Apache License 2.0 2 votes vote down vote up
/**
 * Is called when an error was occurred during image loading
 *
 * @param imageUri   Loading image URI
 * @param view       View for image. Can be <b>null</b>.
 * @param failReason {@linkplain com.nostra13.universalimageloader.core.assist.FailReason The reason} why image
 *                   loading was failed
 */
void onLoadingFailed(String imageUri, View view, FailReason failReason);