class ImageViewTarget extends ViewTarget<ImageView> {

	@Override
	protected void onError(ImageView view, Exception e, Mirage.Source source, MirageRequest request) {
		if (animation() != null) {
			Drawable drawable;
			if (getErrorResourceId() > 0) {
				drawable = view.getContext().getResources().getDrawable(getErrorResourceId());
			} else {
				drawable = getErrorDrawable();
			}
			if (drawable != null) {
				if (!animation().animate(view, drawable, source)) {
					view.setImageDrawable(drawable);
				}
			} else {
				view.setImageDrawable(null);
			}
		} else {
			if (getErrorResourceId() != 0) {
				view.setImageResource(getErrorResourceId());
			} else if (getErrorDrawable() != null) {
				view.setImageDrawable(getErrorDrawable());
			} else {
				view.setImageDrawable(null);
			}
		}
	}

	public  ImageViewTarget(ImageView imageView);
	public  ImageViewTarget(MirageRequest request, ImageView imageView);

}