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

The following examples show how to use com.nostra13.universalimageloader.core.assist.FailReason. These examples are extracted from open source projects. 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
/**
 * 图片加载失败事件处理分发
 * @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 Project: candybar   Source File: LoadAndDisplayImageTask.java    License: 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 3
Source Project: letv   Source File: LoadAndDisplayImageTask.java    License: 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 4
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 5
@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
@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 7
Source Project: WliveTV   Source File: LoadAndDisplayImageTask.java    License: 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 8
Source Project: MiBandDecompiled   Source File: n.java    License: 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 9
Source Project: MiBandDecompiled   Source File: n.java    License: 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 10
Source Project: apng-view   Source File: ApngImageLoadingListener.java    License: 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 11
Source Project: Masaccio   Source File: DemoActivity.java    License: 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 12
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 13
Source Project: candybar   Source File: SimpleImageLoadingListener.java    License: 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 Project: DoraemonKit   Source File: DokitImageLoadingListener.java    License: 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 15
Source Project: DMAudioStreamer   Source File: AdapterMusic.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void onLoadingFailed(String imageUri, View view, FailReason failReason) {
    progressEvent(view, true);
}
 
Example 16
Source Project: DMAudioStreamer   Source File: MusicActivity.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void onLoadingFailed(String imageUri, View view, FailReason failReason) {
    progressEvent(view, true);
}
 
Example 17
Source Project: letv   Source File: SimpleImageLoadingListener.java    License: Apache License 2.0 4 votes vote down vote up
public void onLoadingFailed(String imageUri, View view, FailReason failReason) {
}
 
Example 18
@Override
        public void onLoadingFailed(String imageUri, View view, FailReason failReason) {
//            Log.i("PushNotificationReceiver", "onLoadingFailed");
            loadNotification(extra, context);
        }
 
Example 19
Source Project: mobile-manager-tool   Source File: SimpleImageLoadingListener.java    License: MIT License 4 votes vote down vote up
@Override
public void onLoadingFailed(String imageUri, View view, FailReason failReason) {
	// Empty implementation
}
 
Example 20
@Override
public void onLoadingFailed(String imageUri, View view, FailReason failReason) {
	// Empty implementation
}
 
Example 21
Source Project: WliveTV   Source File: SimpleImageLoadingListener.java    License: 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 Project: BlurImageView   Source File: BlurImageView.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void onLoadingFailed(String imageUri, View view, FailReason failReason) {
  imageView.setImageDrawable(failDrawable);
}
 
Example 23
Source Project: BlurImageView   Source File: BlurImageView.java    License: 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 24
public void onLoadingFailed(String s, View view, FailReason failreason)
{
}
 
Example 25
Source Project: fdroidclient   Source File: FeatureImage.java    License: GNU General Public License v3.0 4 votes vote down vote up
@Override
public void onLoadingFailed(String imageUri, View view, FailReason failReason) {
}
 
Example 26
Source Project: KenBurnsView   Source File: FromURLActivity.java    License: 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 27
@Override
public void onLoadingFailed(String imageUri, View view, FailReason failReason) {
	// Empty implementation
}
 
Example 28
Source Project: candybar   Source File: ImageLoadingListener.java    License: 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 29
Source Project: mobile-manager-tool   Source File: ImageLoadingListener.java    License: MIT License 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
/**
 * 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);