本文整理匯總了Java中com.nostra13.universalimageloader.core.listener.ImageLoadingProgressListener類的典型用法代碼示例。如果您正苦於以下問題:Java ImageLoadingProgressListener類的具體用法?Java ImageLoadingProgressListener怎麽用?Java ImageLoadingProgressListener使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ImageLoadingProgressListener類屬於com.nostra13.universalimageloader.core.listener包,在下文中一共展示了ImageLoadingProgressListener類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: loadImage
import com.nostra13.universalimageloader.core.listener.ImageLoadingProgressListener; //導入依賴的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);
}
示例2: ImageLoadingInfo
import com.nostra13.universalimageloader.core.listener.ImageLoadingProgressListener; //導入依賴的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;
}
示例3: loadImage
import com.nostra13.universalimageloader.core.listener.ImageLoadingProgressListener; //導入依賴的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);
}
示例4: ImageLoadingInfo
import com.nostra13.universalimageloader.core.listener.ImageLoadingProgressListener; //導入依賴的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;
}
示例5: ImageLoadingInfo
import com.nostra13.universalimageloader.core.listener.ImageLoadingProgressListener; //導入依賴的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;
}
示例6: loadImage
import com.nostra13.universalimageloader.core.listener.ImageLoadingProgressListener; //導入依賴的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);
}
示例7: ImageLoadingInfo
import com.nostra13.universalimageloader.core.listener.ImageLoadingProgressListener; //導入依賴的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;
}
示例8: k
import com.nostra13.universalimageloader.core.listener.ImageLoadingProgressListener; //導入依賴的package包/類
public k(String s, ImageAware imageaware, ImageSize imagesize, String s1, DisplayImageOptions displayimageoptions, ImageLoadingListener imageloadinglistener, ImageLoadingProgressListener imageloadingprogresslistener,
ReentrantLock reentrantlock)
{
a = s;
c = imageaware;
d = imagesize;
e = displayimageoptions;
f = imageloadinglistener;
g = imageloadingprogresslistener;
h = reentrantlock;
b = s1;
}
示例9: loadImage
import com.nostra13.universalimageloader.core.listener.ImageLoadingProgressListener; //導入依賴的package包/類
/**
* 添加圖片加載任務到執行線程池中。圖片會通過回調方法返回
* @param uri 圖片URL地址
* @param targetImageSize 期望目標圖片大小尺寸
* @param options 圖片配置項
* @param listener 圖片加載監聽器
* @param progressListener 圖片下載進度監聽器
*/
public void loadImage(String uri, ImageSize targetImageSize, DisplayImageOptions options,
ImageLoadingListener listener, ImageLoadingProgressListener progressListener) {
checkConfiguration();
if (targetImageSize == null) {
targetImageSize = configuration.getMaxImageSize();
}
if (options == null) {
options = configuration.defaultDisplayImageOptions;
}
NonViewAware imageAware = new NonViewAware(uri, targetImageSize, ViewScaleType.CROP);
displayImage(uri, imageAware, options, listener, progressListener);
}
示例10: displayImage
import com.nostra13.universalimageloader.core.listener.ImageLoadingProgressListener; //導入依賴的package包/類
public void displayImage(String uri, ImageAware imageAware, DisplayImageOptions options, ImageLoadingListener listener, ImageLoadingProgressListener progressListener) {
checkConfiguration();
if (imageAware == null) {
throw new IllegalArgumentException(ERROR_WRONG_ARGUMENTS);
}
if (listener == null) {
listener = this.emptyListener;
}
if (options == null) {
options = this.configuration.defaultDisplayImageOptions;
}
if (TextUtils.isEmpty(uri)) {
this.engine.cancelDisplayTaskFor(imageAware);
listener.onLoadingStarted(uri, imageAware.getWrappedView());
if (options.shouldShowImageForEmptyUri()) {
imageAware.setImageDrawable(options.getImageForEmptyUri(this.configuration.resources));
} else {
imageAware.setImageDrawable(null);
}
listener.onLoadingComplete(uri, imageAware.getWrappedView(), null);
return;
}
ImageSize targetSize = ImageSizeUtils.defineTargetSizeForView(imageAware, this.configuration.getMaxImageSize());
String memoryCacheKey = MemoryCacheUtils.generateKey(uri, targetSize);
this.engine.prepareDisplayTaskFor(imageAware, memoryCacheKey);
listener.onLoadingStarted(uri, imageAware.getWrappedView());
Bitmap bmp = (Bitmap) this.configuration.memoryCache.get(memoryCacheKey);
if (bmp == null || bmp.isRecycled()) {
if (options.shouldShowImageOnLoading()) {
imageAware.setImageDrawable(options.getImageOnLoading(this.configuration.resources));
} else if (options.isResetViewBeforeLoading()) {
imageAware.setImageDrawable(null);
}
LoadAndDisplayImageTask displayTask = new LoadAndDisplayImageTask(this.engine, new ImageLoadingInfo(uri, imageAware, targetSize, memoryCacheKey, options, listener, progressListener, this.engine.getLockForUri(uri)), defineHandler(options));
if (options.isSyncLoading()) {
displayTask.run();
return;
} else {
this.engine.submit(displayTask);
return;
}
}
L.d(LOG_LOAD_IMAGE_FROM_MEMORY_CACHE, memoryCacheKey);
if (options.shouldPostProcess()) {
ProcessAndDisplayImageTask displayTask2 = new ProcessAndDisplayImageTask(this.engine, bmp, new ImageLoadingInfo(uri, imageAware, targetSize, memoryCacheKey, options, listener, progressListener, this.engine.getLockForUri(uri)), defineHandler(options));
if (options.isSyncLoading()) {
displayTask2.run();
return;
} else {
this.engine.submit(displayTask2);
return;
}
}
options.getDisplayer().display(bmp, imageAware, LoadedFrom.MEMORY_CACHE);
listener.onLoadingComplete(uri, imageAware.getWrappedView(), bmp);
}
示例11: displayImage
import com.nostra13.universalimageloader.core.listener.ImageLoadingProgressListener; //導入依賴的package包/類
public void displayImage(String uri, ImageAware imageAware, DisplayImageOptions options,
ImageLoadingListener listener, ImageLoadingProgressListener
progressListener) {
displayImage(uri, imageAware, options, null, listener, progressListener);
}
示例12: getView
import com.nostra13.universalimageloader.core.listener.ImageLoadingProgressListener; //導入依賴的package包/類
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder viewHolder = null;
if(convertView == null) {
viewHolder = new ViewHolder();
convertView = mLayoutInflater.inflate(R.layout.frag_item_listview , null);
viewHolder.tv_Manhua_Name = (TextView) convertView.findViewById(R.id.id_manhua_name);
viewHolder.tv_Manhua_lastUpdate = (TextView) convertView.findViewById(R.id.id_manhua_lastUpdate);
viewHolder.iv_Manhua_Cover = (ImageView) convertView.findViewById(R.id.id_manhua_Cover);
convertView.setTag(viewHolder);
}
else {
viewHolder = (ViewHolder) convertView.getTag();
viewHolder.iv_Manhua_Cover.setImageResource(R.drawable.empty_photo);
}
Manhua manhua = getItem(position);
viewHolder.tv_Manhua_Name.setText(manhua.getmName());
int manhuaLastUpdate = manhua.getmLastUpdate();
int year = manhuaLastUpdate / 10000;
int month = manhuaLastUpdate / 100 % 100;
int day = manhuaLastUpdate % 100;
viewHolder.tv_Manhua_lastUpdate.setText("������� : " + year + "��" + month + "��" + day + "��");
String imageURL = manhua.getmCoverImg();
mImageLoader.displayImage(imageURL , viewHolder.iv_Manhua_Cover , mOptions , new SimpleImageLoadingListener() , new ImageLoadingProgressListener() {
@Override
public void onProgressUpdate(String imageUri, View view, int current, int total) {
}
});
return convertView;
}
示例13: getView
import com.nostra13.universalimageloader.core.listener.ImageLoadingProgressListener; //導入依賴的package包/類
/**
* ÿ������Ҫ��ʾ����������������getView()����
*/
@Override
public View getView(int position, View convertView, ViewGroup parent) {
Manhua manhua = getItem(position);
String imageUrl = manhua.getmCoverImg();
String manhuaName = manhua.getmName();
ViewHolder viewHolder = null;
if(convertView == null) {
viewHolder = new ViewHolder();
convertView = mLayoutInflater.inflate(R.layout.photo_layout, null);
viewHolder.imageView = (ImageView) convertView.findViewById(R.id.id_photo);
viewHolder.textView = (TextView) convertView.findViewById(R.id.id_firsttab_manhua_name);
convertView.setTag(viewHolder);
}
else {
viewHolder = (ViewHolder) convertView.getTag();
viewHolder.imageView.setImageResource(R.drawable.empty_photo);
}
if(viewHolder.imageView.getLayoutParams().height != mItemHeight) {
viewHolder.imageView.getLayoutParams().height = mItemHeight;
}
viewHolder.textView.setText(manhuaName);
mImageLoader.displayImage(imageUrl , viewHolder.imageView , mOptions , new SimpleImageLoadingListener() , new ImageLoadingProgressListener() {
@Override
public void onProgressUpdate(String imageUri, View view, int current, int total) {
}
});
return convertView;
}
示例14: displayImage
import com.nostra13.universalimageloader.core.listener.ImageLoadingProgressListener; //導入依賴的package包/類
public void displayImage(String s, ImageView imageview, DisplayImageOptions displayimageoptions, ImageLoadingListener imageloadinglistener, ImageLoadingProgressListener imageloadingprogresslistener)
{
displayImage(s, ((ImageAware) (new ImageViewAware(imageview))), displayimageoptions, imageloadinglistener, imageloadingprogresslistener);
}
示例15: loadImage
import com.nostra13.universalimageloader.core.listener.ImageLoadingProgressListener; //導入依賴的package包/類
/**
* Adds load image task to execution pool. Image will be returned with
* {@link ImageLoadingListener#onLoadingComplete(String, android.view.View, android.graphics.Bitmap)} callback}.
* <br />
* <b>NOTE:</b> {@link #init(ImageLoaderConfiguration)} method must be called before this method call
*
* @param uri Image URI (i.e. "http://site.com/image.png", "file:///mnt/sdcard/image.png")
* @param targetImageSize Minimal size for {@link Bitmap} which will be returned in
* {@linkplain ImageLoadingListener#onLoadingComplete(String, android.view.View,
* android.graphics.Bitmap)} callback}. Downloaded image will be decoded
* and scaled to {@link Bitmap} of the size which is <b>equal or larger</b> (usually a bit
* larger) than incoming targetImageSize.
* @param options {@linkplain com.nostra13.universalimageloader.core.DisplayImageOptions Options} for image
* decoding and displaying. If <b>null</b> - default display image options
* {@linkplain ImageLoaderConfiguration.Builder#defaultDisplayImageOptions(DisplayImageOptions)
* from configuration} will be used.<br />
* @param listener {@linkplain ImageLoadingListener Listener} for image loading process. Listener fires
* events on UI thread if this method is called on UI thread.
* @param progressListener {@linkplain com.nostra13.universalimageloader.core.listener.ImageLoadingProgressListener
* Listener} for image loading progress. Listener fires events on UI thread if this method
* is called on UI thread. Caching on disk should be enabled in
* {@linkplain com.nostra13.universalimageloader.core.DisplayImageOptions options} to make
* this listener work.
* @throws IllegalStateException if {@link #init(ImageLoaderConfiguration)} method wasn't called before
*/
public void loadImage(String uri, ImageSize targetImageSize, DisplayImageOptions options,
ImageLoadingListener listener, ImageLoadingProgressListener progressListener) {
checkConfiguration();
if (targetImageSize == null) {
targetImageSize = configuration.getMaxImageSize();
}
if (options == null) {
options = configuration.defaultDisplayImageOptions;
}
NonViewAware imageAware = new NonViewAware(uri, targetImageSize, ViewScaleType.CROP);
displayImage(uri, imageAware, options, listener, progressListener);
}