当前位置: 首页>>代码示例>>Java>>正文


Java BaseImageDecoder类代码示例

本文整理汇总了Java中com.nostra13.universalimageloader.core.decode.BaseImageDecoder的典型用法代码示例。如果您正苦于以下问题:Java BaseImageDecoder类的具体用法?Java BaseImageDecoder怎么用?Java BaseImageDecoder使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


BaseImageDecoder类属于com.nostra13.universalimageloader.core.decode包,在下文中一共展示了BaseImageDecoder类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initImageLoader

import com.nostra13.universalimageloader.core.decode.BaseImageDecoder; //导入依赖的package包/类
/**
 * 初始化图片载入框架
 */
private void initImageLoader() {
    File cacheDir = StorageUtils.getCacheDirectory(this);
    int MAXMEMONRY = (int) (Runtime.getRuntime().maxMemory());
    // System.out.println("dsa-->"+MAXMEMONRY+"   "+(MAXMEMONRY/5));//.memoryCache(new
    // LruMemoryCache(50 * 1024 * 1024))
    DisplayImageOptions defaultOptions = new DisplayImageOptions.Builder()
            .cacheInMemory(true)
            .cacheOnDisk(true)
            .build();
    ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(
            this).memoryCacheExtraOptions(480, 800).defaultDisplayImageOptions(defaultOptions)
            .diskCacheExtraOptions(480, 800, null).threadPoolSize(3)
            .threadPriority(Thread.NORM_PRIORITY - 2)
            .tasksProcessingOrder(QueueProcessingType.FIFO)
            .denyCacheImageMultipleSizesInMemory()
            .memoryCache(new LruMemoryCache(MAXMEMONRY / 5))
            .diskCache(new UnlimitedDiskCache(cacheDir))
            .diskCacheFileNameGenerator(new HashCodeFileNameGenerator()) // default
            .imageDownloader(new BaseImageDownloader(this)) // default
            .imageDecoder(new BaseImageDecoder(false)) // default
            .defaultDisplayImageOptions(DisplayImageOptions.createSimple()).build();

    ImageLoader.getInstance().init(config);
}
 
开发者ID:viseator,项目名称:MontageCam,代码行数:28,代码来源:BaseActivity.java

示例2: initImageLoader

import com.nostra13.universalimageloader.core.decode.BaseImageDecoder; //导入依赖的package包/类
private void initImageLoader(){
        Context context = getApplicationContext();
        File cacheDir = StorageUtils.getCacheDirectory(context);
        ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(context)
                .memoryCacheExtraOptions(480, 800) // default = device screen dimensions
                .diskCacheExtraOptions(480, 800, null)
                .threadPriority(Thread.NORM_PRIORITY - 2) // default
                .tasksProcessingOrder(QueueProcessingType.FIFO) // default
                .denyCacheImageMultipleSizesInMemory()
                .memoryCache(new LruMemoryCache(2 * 1024 * 1024))
                .memoryCacheSize(2 * 1024 * 1024)
                .memoryCacheSizePercentage(13) // default
                .diskCache(new UnlimitedDiscCache(cacheDir)) // default
                .diskCacheSize(50 * 1024 * 1024)
                .diskCacheFileCount(100)
                .diskCacheFileNameGenerator(new HashCodeFileNameGenerator()) // default
                .imageDownloader(new BaseImageDownloader(context)) // default
                .imageDecoder(new BaseImageDecoder(false)) // default
                .defaultDisplayImageOptions(DisplayImageOptions.createSimple()) // default
//                .writeDebugLogs()
                .build();

        ImageLoader.getInstance().init(config);
    }
 
开发者ID:snowdream,项目名称:snowdream-books-android,代码行数:25,代码来源:MainApplication.java

示例3: getDefaultImageLoaderConfigurationBuilder

import com.nostra13.universalimageloader.core.decode.BaseImageDecoder; //导入依赖的package包/类
public static ImageLoaderConfiguration.Builder getDefaultImageLoaderConfigurationBuilder(Context context) {
        File cacheDir = StorageUtils.getCacheDirectory(context);
        ImageLoaderConfiguration.Builder builder = new ImageLoaderConfiguration.Builder(context)
//                .memoryCacheExtraOptions(480, 800) // default = device screen dimensions
//                .discCacheExtraOptions(480, 800, Bitmap.CompressFormat.JPEG, 75, null)
                .threadPoolSize(3) // default
                .threadPriority(Thread.NORM_PRIORITY - 1) // default
                .tasksProcessingOrder(QueueProcessingType.FIFO) // default
                .denyCacheImageMultipleSizesInMemory()
//                .memoryCache(new LruMemoryCache(2 * 1024 * 1024))
//                .memoryCacheSize(2 * 1024 * 1024)
                .memoryCacheSizePercentage(13) // default
                .discCache(new UnlimitedDiscCache(cacheDir)) // default
//                .discCacheSize(50 * 1024 * 1024)
                .discCacheFileCount(1000)
                .discCacheFileNameGenerator(new HashCodeFileNameGenerator()) // default
                .imageDownloader(new BaseImageDownloader(context)) // default
                .imageDecoder(new BaseImageDecoder(false)) // default
                        //   .defaultDisplayImageOptions(DisplayImageOptions.createSimple()) // default
                .defaultDisplayImageOptions(getDefaultImageOptions());
        return builder;
    }
 
开发者ID:cymcsg,项目名称:UltimateAndroid,代码行数:23,代码来源:UniversalImageLoader.java

示例4: getDefaultImageLoaderConfigurationBuilder

import com.nostra13.universalimageloader.core.decode.BaseImageDecoder; //导入依赖的package包/类
/**
     * Get default ImageLoaderConfiguration.Builder,and you can easily change the builder.
     * @param context
     * @return
     */
    public static ImageLoaderConfiguration.Builder getDefaultImageLoaderConfigurationBuilder(Context context) {
        File cacheDir = StorageUtils.getCacheDirectory(context);
        ImageLoaderConfiguration.Builder builder = new ImageLoaderConfiguration.Builder(context)
//                .memoryCacheExtraOptions(480, 800) // default = device screen dimensions
//                .discCacheExtraOptions(480, 800, Bitmap.CompressFormat.JPEG, 75, null)
                .threadPoolSize(3) // default
                .threadPriority(Thread.NORM_PRIORITY - 1) // default
                .tasksProcessingOrder(QueueProcessingType.FIFO) // default
                .denyCacheImageMultipleSizesInMemory()
//                .memoryCache(new LruMemoryCache(2 * 1024 * 1024))
//                .memoryCacheSize(2 * 1024 * 1024)
                .memoryCacheSizePercentage(13) // default
                .diskCache(new UnlimitedDiskCache(cacheDir)) // default
//                .discCacheSize(50 * 1024 * 1024)
                .diskCacheFileCount(1000)
                .diskCacheFileNameGenerator(new HashCodeFileNameGenerator()) // default
                .imageDownloader(new BaseImageDownloader(context)) // default
                .imageDecoder(new BaseImageDecoder(false)) // default
                        //   .defaultDisplayImageOptions(DisplayImageOptions.createSimple()) // default
                .defaultDisplayImageOptions(getDefaultImageOptions());
        return builder;
    }
 
开发者ID:cymcsg,项目名称:UltimateAndroid,代码行数:28,代码来源:UniversalImageLoader.java

示例5: initImageLoader

import com.nostra13.universalimageloader.core.decode.BaseImageDecoder; //导入依赖的package包/类
public static void initImageLoader(Context context) {
    File cacheDir = StorageUtils.getCacheDirectory(context);
    ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(context)
            .memoryCacheExtraOptions(480, 800) // default = device screen dimensions
            .denyCacheImageMultipleSizesInMemory()
            .discCacheExtraOptions(480, 800, Bitmap.CompressFormat.JPEG, 75, null)
            .threadPriority(Thread.NORM_PRIORITY - 2) // default
            .tasksProcessingOrder(QueueProcessingType.FIFO) // default
            .denyCacheImageMultipleSizesInMemory()
            .memoryCache(new LruMemoryCache(2 * 1024 * 1024))
            .memoryCacheSize(2 * 1024 * 1024)
            .memoryCacheSizePercentage(13) // default
            .discCache(new UnlimitedDiscCache(cacheDir)) // default
            .discCacheSize(50 * 1024 * 1024)
            .discCacheFileCount(100)
            .discCacheFileNameGenerator(new HashCodeFileNameGenerator()) // default
            .imageDownloader(new BaseImageDownloader(context)) // default
            .imageDecoder(new BaseImageDecoder(true)) // default
            .defaultDisplayImageOptions(DisplayImageOptions.createSimple()) // default
            .writeDebugLogs()
            .build();

    ImageLoader.getInstance().init(config);
}
 
开发者ID:snowdream,项目名称:android-imageviewer,代码行数:25,代码来源:MainApplication.java

示例6: initImageLoader

import com.nostra13.universalimageloader.core.decode.BaseImageDecoder; //导入依赖的package包/类
/**
     * @return void
     * @Title: initImageLoader
     * @Description: TODO
     */
    private void initImageLoader() {
        DisplayImageOptions imageOptions = new DisplayImageOptions.Builder()
                .showImageOnLoading(R.drawable.default_background)
                .showImageOnFail(R.drawable.default_background)
                .cacheInMemory(true).cacheOnDisk(true)
                .resetViewBeforeLoading(true).considerExifParams(false)
                .bitmapConfig(Bitmap.Config.RGB_565).build();
        ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(this)
                .memoryCacheExtraOptions(480, 800)
                .diskCacheExtraOptions(480, 800, null)
                .threadPoolSize(5)
                .threadPriority(Thread.NORM_PRIORITY)
                .tasksProcessingOrder(QueueProcessingType.LIFO)
                .denyCacheImageMultipleSizesInMemory()
                .memoryCache(new LruMemoryCache(2 * 1024 * 1024))
                .memoryCacheSize(2 * 1024 * 1024)
                .memoryCacheSizePercentage(10)
//                .diskCache(
//                        new UnlimitedDiscCache(StorageUtils.getCacheDirectory(
//                                this, true)))
                .diskCacheSize(50 * 1024 * 1024).diskCacheFileCount(100)
                .diskCacheFileNameGenerator(new HashCodeFileNameGenerator())
                .imageDownloader(new BaseImageDownloader(this))
                .imageDecoder(new BaseImageDecoder(false))
                .defaultDisplayImageOptions(DisplayImageOptions.createSimple())
                .defaultDisplayImageOptions(imageOptions).build();
        ImageLoader.getInstance().init(config);
    }
 
开发者ID:wangzhaosheng,项目名称:publicProject,代码行数:34,代码来源:JRYGApplaction.java

示例7: initImageLoader

import com.nostra13.universalimageloader.core.decode.BaseImageDecoder; //导入依赖的package包/类
private void initImageLoader() {
    File cacheDir = FileUtil.getCacheDirectory(this, FilePathConfig.PATH_IMAGEDOWNLOADER);

    DisplayImageOptions options = new DisplayImageOptions.Builder()
            .showImageOnLoading(R.drawable.default_imageview_background) // resource or drawable
            .showImageForEmptyUri(R.drawable.default_imageview_background) // resource or drawable
            .showImageOnFail(R.drawable.default_imageview_background) // resource or drawable
            .resetViewBeforeLoading(false)  // default
            .delayBeforeLoading(200)
            .cacheInMemory(true)
            .cacheOnDisk(true)
            .imageScaleType(ImageScaleType.IN_SAMPLE_POWER_OF_2) // default
            .bitmapConfig(Bitmap.Config.ARGB_8888) // default
            .displayer(new SimpleBitmapDisplayer()) // default
            .build();

    ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(getApplicationContext())
            .memoryCacheExtraOptions(480, 800) // default = device screen dimensions
            .diskCacheExtraOptions(480, 800, null)
            .threadPoolSize(3) // default
            .threadPriority(Thread.NORM_PRIORITY - 2) // default
            .tasksProcessingOrder(QueueProcessingType.FIFO) // default
            .denyCacheImageMultipleSizesInMemory()
            .memoryCache(new LruMemoryCache(20 * 1024 * 1024))
            .memoryCacheSize(2 * 1024 * 1024)
            .memoryCacheSizePercentage(13) // default
            .diskCache(new UnlimitedDiskCache(cacheDir)) // default
            .diskCacheSize(50 * 1024 * 1024)
            .diskCacheFileCount(100)
            .diskCacheFileNameGenerator(new HashCodeFileNameGenerator()) // default
            .imageDownloader(new BaseImageDownloader(getApplicationContext())) // default
            .imageDecoder(new BaseImageDecoder(false)) // default
            .defaultDisplayImageOptions(options)
            .build();
    ImageLoader.getInstance().init(config);
}
 
开发者ID:orangecoder,项目名称:VideoRecord,代码行数:37,代码来源:MyApplication.java

示例8: getLoaderConfig

import com.nostra13.universalimageloader.core.decode.BaseImageDecoder; //导入依赖的package包/类
private ImageLoaderConfiguration getLoaderConfig() {
    return new ImageLoaderConfiguration.Builder(this)
            .memoryCacheExtraOptions(320, 600)
            .threadPoolSize(4)
            .threadPriority(Thread.NORM_PRIORITY - 1)
            .tasksProcessingOrder(QueueProcessingType.FIFO)
            .denyCacheImageMultipleSizesInMemory()
            .memoryCache(new LruMemoryCache(20 * 1024 * 1024))
            .diskCacheSize(20 * 1024 * 1024)
            .diskCacheFileNameGenerator(new Md5FileNameGenerator())
            .imageDownloader(new BaseImageDownloader(this))
            .imageDecoder(new BaseImageDecoder(true))
            .defaultDisplayImageOptions(getOptions())
            .build();
}
 
开发者ID:active-citizen,项目名称:android.java,代码行数:16,代码来源:AGApplication.java

示例9: initImageLoader

import com.nostra13.universalimageloader.core.decode.BaseImageDecoder; //导入依赖的package包/类
/**
 * 初始化ImageLoader
 * 
 * @param context
 */
private static void initImageLoader(Context context) {
	if (sConfig != null) {
		return;
	}

	File cacheDir = StorageUtils.getCacheDirectory(context);
	sConfig = new ImageLoaderConfiguration.Builder(context)
			.memoryCacheExtraOptions(480, 800)
			// default = device screen dimensions
			.denyCacheImageMultipleSizesInMemory()
			.threadPriority(Thread.NORM_PRIORITY - 2)
			// default
			.tasksProcessingOrder(QueueProcessingType.LIFO)
			// default
			.denyCacheImageMultipleSizesInMemory()
			.memoryCache(new LruMemoryCache(10 * 1024 * 1024))
			.memoryCacheSize(10 * 1024 * 1024)
			.memoryCacheSizePercentage(13)
			.diskCache(new UnlimitedDiskCache(cacheDir))
			// default
			.diskCacheSize(50 * 1024 * 1024).diskCacheFileCount(100)
			.diskCacheFileNameGenerator(new HashCodeFileNameGenerator()) // default
			.imageDownloader(new BaseImageDownloader(context)) // default
			.imageDecoder(new BaseImageDecoder(true)) // default
			.defaultDisplayImageOptions(DisplayImageOptions.createSimple()) // default
			.writeDebugLogs().build();

	ImageLoader.getInstance().init(sConfig);
}
 
开发者ID:hehonghui,项目名称:AndroidImageBrowser,代码行数:35,代码来源:UILImagePagerAdapter.java

示例10: initImageLoader

import com.nostra13.universalimageloader.core.decode.BaseImageDecoder; //导入依赖的package包/类
/**
 * initial Universal ImageLoader
 *
 * @param applicationContext
 */
public static void initImageLoader(Context applicationContext) {
    File cacheDir = null;
    if (FileSystem.available())
        cacheDir = StorageUtils.getOwnCacheDirectory(applicationContext, FileSystem.getDirectoryPath(DefaultFileDirectoryContext.FILE_DIRECTORY_TYPE_PICTURE));
    else
        cacheDir = StorageUtils.getCacheDirectory(applicationContext);
    ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(applicationContext)
            .memoryCacheExtraOptions(480, 800) // default = device screen dimensions
            .diskCacheExtraOptions(480, 800, null)
            .threadPoolSize(3) // default
            .threadPriority(Thread.NORM_PRIORITY - 2) // default
            .tasksProcessingOrder(QueueProcessingType.FIFO) // default
            .denyCacheImageMultipleSizesInMemory()
            .memoryCache(new LruMemoryCache(2 * 1024 * 1024))
            .memoryCacheSize(2 * 1024 * 1024)
            .memoryCacheSizePercentage(13) // default
            .diskCache(new UnlimitedDiscCache(cacheDir)) // default
            .diskCacheSize(50 * 1024 * 1024)
            .diskCacheFileCount(100)
            .diskCacheFileNameGenerator(new HashCodeFileNameGenerator()) // default
            .imageDownloader(new BaseImageDownloader(applicationContext)) // default
            .imageDecoder(new BaseImageDecoder(true)) // default
            .defaultDisplayImageOptions(DisplayImageOptions.createSimple()) // default
            .writeDebugLogs()
            .build();
    ImageLoader.getInstance().init(config);
}
 
开发者ID:bmbstack,项目名称:android-kit-old,代码行数:33,代码来源:AppUtils.java

示例11: getImageLoaderConfiguration

import com.nostra13.universalimageloader.core.decode.BaseImageDecoder; //导入依赖的package包/类
public static ImageLoaderConfiguration getImageLoaderConfiguration(Context context) {
    final int MEMORY_CACHE_LIMIT = 2 * 1024 * 1024;
    final int THREAD_POOL_SIZE = 3;

    ImageLoaderConfiguration imageLoaderConfiguration = new ImageLoaderConfiguration.Builder(context)
            .threadPoolSize(THREAD_POOL_SIZE).threadPriority(Thread.NORM_PRIORITY)
            .denyCacheImageMultipleSizesInMemory()
            .memoryCache(new UsingFreqLimitedMemoryCache(MEMORY_CACHE_LIMIT))
            .defaultDisplayImageOptions(ImageLoaderUtils.UIL_DEFAULT_DISPLAY_OPTIONS)
            .imageDecoder(new SmartUriDecoder(context, new BaseImageDecoder(false)))
            .denyCacheImageMultipleSizesInMemory()
            .discCacheFileNameGenerator(new HashCodeFileNameGeneratorWithoutToken()).build();
    return imageLoaderConfiguration;
}
 
开发者ID:QuickBlox,项目名称:q-municate-android,代码行数:15,代码来源:ImageLoaderUtils.java

示例12: SmartUriDecoder

import com.nostra13.universalimageloader.core.decode.BaseImageDecoder; //导入依赖的package包/类
public SmartUriDecoder(Context context, BaseImageDecoder imageUriDecoder) {
    if (imageUriDecoder == null) {
        throw new NullPointerException("Image decoder can't be null");
    }

    this.context = new WeakReference(context);
    this.imageUriDecoder = imageUriDecoder;
}
 
开发者ID:QuickBlox,项目名称:q-municate-android,代码行数:9,代码来源:ImageLoaderUtils.java

示例13: createImageDecoder

import com.nostra13.universalimageloader.core.decode.BaseImageDecoder; //导入依赖的package包/类
/** Creates default implementation of {@link ImageDecoder} - {@link BaseImageDecoder} */
public static ImageDecoder createImageDecoder(boolean loggingEnabled) {
	return new BaseImageDecoder(loggingEnabled);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:5,代码来源:DefaultConfigurationFactory.java

示例14: createImageDecoder

import com.nostra13.universalimageloader.core.decode.BaseImageDecoder; //导入依赖的package包/类
public static ImageDecoder createImageDecoder(boolean loggingEnabled) {
    return new BaseImageDecoder(loggingEnabled);
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:4,代码来源:DefaultConfigurationFactory.java

示例15: ThumbnailDecoder

import com.nostra13.universalimageloader.core.decode.BaseImageDecoder; //导入依赖的package包/类
public ThumbnailDecoder(ContentResolver cr, BaseImageDecoder baseDecoder) {
    contentResolver = cr;
    baseImageDecoder = baseDecoder;
}
 
开发者ID:jianliaoim,项目名称:talk-android,代码行数:5,代码来源:ThumbnailDecoder.java


注:本文中的com.nostra13.universalimageloader.core.decode.BaseImageDecoder类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。