本文整理汇总了Java中com.nostra13.universalimageloader.core.listener.ImageLoadingListener类的典型用法代码示例。如果您正苦于以下问题:Java ImageLoadingListener类的具体用法?Java ImageLoadingListener怎么用?Java ImageLoadingListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ImageLoadingListener类属于com.nostra13.universalimageloader.core.listener包,在下文中一共展示了ImageLoadingListener类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: load
import com.nostra13.universalimageloader.core.listener.ImageLoadingListener; //导入依赖的package包/类
public void load(String imageUri,String access_token, ImageView imageView, Drawable defaultDrawable,
int round,ImageLoadingListener listener){
DisplayImageOptions.Builder builder = new DisplayImageOptions.Builder();
builder.showImageOnLoading(defaultDrawable).showImageForEmptyUri(null)
.showImageOnFail(null).cacheInMemory(true).cacheOnDisk(true)
.considerExifParams(true).bitmapConfig(Bitmap.Config.RGB_565);
if (round > 0) {
builder.displayer(new RoundedBitmapDisplayer(round));
}
DisplayImageOptions options = builder.build();
try{
if(listener == null){
_imageLoader.displayImage(imageUri,access_token, imageView, options);
}else{
_imageLoader.displayImage(imageUri,access_token, imageView, options,listener);
}
}catch(Exception e){
e.printStackTrace();
}
}
示例2: load
import com.nostra13.universalimageloader.core.listener.ImageLoadingListener; //导入依赖的package包/类
public void load(String imageUri, ImageView imageView, Drawable defaultDrawable,
int round,ImageLoadingListener listener){
DisplayImageOptions.Builder builder = new DisplayImageOptions.Builder();
builder.showImageOnLoading(defaultDrawable).showImageForEmptyUri(null)
.showImageOnFail(null).cacheInMemory(true).cacheOnDisk(true)
.considerExifParams(true).bitmapConfig(Bitmap.Config.RGB_565);
if (round > 0) {
builder.displayer(new RoundedBitmapDisplayer(round));
}
DisplayImageOptions options = builder.build();
try{
if(listener == null){
_imageLoader.displayImage(imageUri, imageView, options);
}else{
_imageLoader.displayImage(imageUri, imageView, options,listener);
}
}catch(Exception e){
e.printStackTrace();
}
}
示例3: setdailyfineimg
import com.nostra13.universalimageloader.core.listener.ImageLoadingListener; //导入依赖的package包/类
public static void setdailyfineimg(String url, ImageView imageView,
ImageLoadingListener listener) {
if (dailyfines == null) {
dailyfines = new DisplayImageOptions.Builder()
.showImageOnLoading(0)
.showImageForEmptyUri(0)
.showImageOnFail(0)
.cacheInMemory(true)
// .cacheOnDisk(true)
.considerExifParams(true)
.bitmapConfig(Bitmap.Config.RGB_565)
.imageScaleType(ImageScaleType.IN_SAMPLE_POWER_OF_2)
.build();
}
ImageLoader.getInstance().displayImage(url, imageView, dailyfines,
listener);
}
示例4: show
import com.nostra13.universalimageloader.core.listener.ImageLoadingListener; //导入依赖的package包/类
public static boolean show(String url, ImageView imageView, ImageLoadingListener listener){
imageView.setImageDrawable(null);
if(url == null)
return false;
if(!url.startsWith("http"))
url = ShikiApi.HTTP_SERVER + url;
if(url.contains(".gif") && Build.VERSION.SDK_INT > 13){
Ion.with(imageView)
.animateGif(AnimateGifMode.ANIMATE)
// .animateLoad(R.anim.spin_animation)
.smartSize(true)
.error(R.drawable.missing_preview)
.load(url);
if(listener!=null)
listener.onLoadingComplete(null,null,null);
}
else
ImageLoader.getInstance().displayImage(url, imageView, listener);
return true;
}
示例5: loadImage
import com.nostra13.universalimageloader.core.listener.ImageLoadingListener; //导入依赖的package包/类
public void loadImage(String s, ImageSize imagesize, DisplayImageOptions displayimageoptions, ImageLoadingListener imageloadinglistener, ImageLoadingProgressListener imageloadingprogresslistener)
{
a();
if (imagesize == null)
{
imagesize = h.a();
}
DisplayImageOptions displayimageoptions1;
if (displayimageoptions == null)
{
displayimageoptions1 = h.r;
} else
{
displayimageoptions1 = displayimageoptions;
}
displayImage(s, new NonViewAware(s, imagesize, ViewScaleType.CROP), displayimageoptions1, imageloadinglistener, imageloadingprogresslistener);
}
示例6: run
import com.nostra13.universalimageloader.core.listener.ImageLoadingListener; //导入依赖的package包/类
protected static void run(Gogh g) {
DisplayImageOptions options = g.mOptions;
DisplayImageOptions.Builder optionsBuilder = g.mOptionsBuilder;
if (g.mHideIfNull) {
if (g.mUrl == null) {
g.mView.setVisibility(View.GONE);
} else {
g.mView.setVisibility(View.VISIBLE);
}
}
ImageLoadingListener imageLoadingListener = null;
if (g.mOnBitmap != null || g.mTaskSource != null) {
imageLoadingListener = new MySimpleImageLoadingListener(g.mTaskSource, g.mOnBitmap);
}
if (g.mAnimation != NOT_ANIMATED || g.mDisplayer != null) {
MySimpleImageDisplayer displayer = new MySimpleImageDisplayer(g.mAnimation, g.mDisplayer);
if (optionsBuilder == null) optionsBuilder = new DisplayImageOptions.Builder().cloneFrom(options);
optionsBuilder.displayer(displayer).resetViewBeforeLoading(g.mAnimation != CROSS_FADE);
}
if (optionsBuilder != null) options = optionsBuilder.build();
UIL.display_(g.mUrl, g.mView, imageLoadingListener, options);
}
示例7: setImage
import com.nostra13.universalimageloader.core.listener.ImageLoadingListener; //导入依赖的package包/类
public static void setImage(ImageView view, Uri imageUri, int defaultPlaceholder,
ImageLoadingListener loadingListener) {
if (view == null)
return;
if (imageUri != null) {
String uri = imageUri.toString();
if (uri.startsWith("file:/") && !uri.startsWith("file:///")) {
uri = uri.replace("file:/", "file:///");
}
uri = Uri.decode(uri);
ImageLoader.getInstance().displayImage(uri, view, loadingListener);
} else {
view.setImageResource(defaultPlaceholder);
}
}
示例8: ImageLoadingInfo
import com.nostra13.universalimageloader.core.listener.ImageLoadingListener; //导入依赖的package包/类
public ImageLoadingInfo(String uri, ImageAware imageAware, ImageSize targetSize, String memoryCacheKey,
DisplayImageOptions options, ImageLoadingListener listener,
ImageLoadingProgressListener progressListener, ReentrantLock loadFromUriLock) {
this.uri = uri;
this.imageAware = imageAware;
this.targetSize = targetSize;
this.options = options;
this.listener = listener;
this.progressListener = progressListener;
this.loadFromUriLock = loadFromUriLock;
this.memoryCacheKey = memoryCacheKey;
}
示例9: setProfileImage
import com.nostra13.universalimageloader.core.listener.ImageLoadingListener; //导入依赖的package包/类
public static void setProfileImage(String url, ImageView imgView, ImageLoadingListener listener) {
if (url != null) {
if (ImageLoader.getInstance() != null) {
ImageLoader.getInstance().displayImage(url, imgView, Util.displayImageOptions_circluar, listener);
}
}
}
示例10: setURLImage
import com.nostra13.universalimageloader.core.listener.ImageLoadingListener; //导入依赖的package包/类
public static void setURLImage(String url, ImageView imgView, ImageLoadingListener listener) {
if (url != null) {
if (ImageLoader.getInstance() != null) {
ImageLoader.getInstance().displayImage(url, imgView, Util.displayImageOptions_original, listener);
}
}
}
示例11: loadImage
import com.nostra13.universalimageloader.core.listener.ImageLoadingListener; //导入依赖的package包/类
public void loadImage(String uri, ImageSize targetImageSize, DisplayImageOptions options, ImageLoadingListener listener, ImageLoadingProgressListener progressListener) {
checkConfiguration();
if (targetImageSize == null) {
targetImageSize = this.configuration.getMaxImageSize();
}
if (options == null) {
options = this.configuration.defaultDisplayImageOptions;
}
displayImage(uri, new NonViewAware(uri, targetImageSize, ViewScaleType.CROP), options, listener, progressListener);
}
示例12: ImageLoadingInfo
import com.nostra13.universalimageloader.core.listener.ImageLoadingListener; //导入依赖的package包/类
public ImageLoadingInfo(String uri, ImageAware imageAware, ImageSize targetSize, String memoryCacheKey, DisplayImageOptions options, ImageLoadingListener listener, ImageLoadingProgressListener progressListener, ReentrantLock loadFromUriLock) {
this.uri = uri;
this.imageAware = imageAware;
this.targetSize = targetSize;
this.options = options;
this.listener = listener;
this.progressListener = progressListener;
this.loadFromUriLock = loadFromUriLock;
this.memoryCacheKey = memoryCacheKey;
}
示例13: loadImage
import com.nostra13.universalimageloader.core.listener.ImageLoadingListener; //导入依赖的package包/类
public synchronized void loadImage(String url, ImageView imageView, ImageLoadingListener loadingListener) {
if (ImageLoader.getInstance().isInited()) {
if (!(TextUtils.isEmpty(url) || imageView == null)) {
ImageLoader.getInstance().displayImage(url, imageView, this.options, loadingListener);
}
}
}
示例14: ImageLoadingInfo
import com.nostra13.universalimageloader.core.listener.ImageLoadingListener; //导入依赖的package包/类
public ImageLoadingInfo(String uri, ImageAware imageAware, ImageSize targetSize, String memoryCacheKey,
DisplayImageOptions options, ImageLoadingListener listener,
ImageLoadingProgressListener progressListener, ReentrantLock loadFromUriLock) {
this.uri = uri;
this.imageAware = imageAware;
this.targetSize = targetSize;
this.options = options;
this.listener = listener;
this.progressListener = progressListener;
this.loadFromUriLock = loadFromUriLock;
this.memoryCacheKey = memoryCacheKey;
mFileTypeStatus = BitmapDisplayer.FILE_TYPE_UNDEFINE;
mFilePath = null;
}
示例15: loadImage
import com.nostra13.universalimageloader.core.listener.ImageLoadingListener; //导入依赖的package包/类
public void loadImage(String uri, ImageSize targetImageSize, DisplayImageOptions options,
ImageLoadingListener listener, ImageLoadingProgressListener
progressListener) {
checkConfiguration();
if (targetImageSize == null) {
targetImageSize = this.configuration.getMaxImageSize();
}
if (options == null) {
options = this.configuration.defaultDisplayImageOptions;
}
displayImage(uri, new NonViewAware(uri, targetImageSize, ViewScaleType.CROP), options,
listener, progressListener);
}