本文整理汇总了Java中com.nostra13.universalimageloader.core.DefaultConfigurationFactory类的典型用法代码示例。如果您正苦于以下问题:Java DefaultConfigurationFactory类的具体用法?Java DefaultConfigurationFactory怎么用?Java DefaultConfigurationFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DefaultConfigurationFactory类属于com.nostra13.universalimageloader.core包,在下文中一共展示了DefaultConfigurationFactory类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initImageLoader
import com.nostra13.universalimageloader.core.DefaultConfigurationFactory; //导入依赖的package包/类
private void initImageLoader() {
if (!ImageLoader.getInstance().isInited()) {
DisplayImageOptions.Builder displayBuilder = new DisplayImageOptions.Builder();
displayBuilder.cacheInMemory(true);
displayBuilder.cacheOnDisk(true);
displayBuilder.showImageOnLoading(com.ns.mutiphotochoser.R.drawable.default_photo);
displayBuilder.showImageForEmptyUri(com.ns.mutiphotochoser.R.drawable.default_photo);
displayBuilder.considerExifParams(true);
displayBuilder.bitmapConfig(Bitmap.Config.RGB_565);
displayBuilder.imageScaleType(ImageScaleType.EXACTLY);
displayBuilder.displayer(new FadeInBitmapDisplayer(300));
ImageLoaderConfiguration.Builder loaderBuilder = new ImageLoaderConfiguration.Builder(getApplication());
loaderBuilder.defaultDisplayImageOptions(displayBuilder.build());
loaderBuilder.memoryCacheSize(getMemoryCacheSize());
try {
File cacheDir = new File(getExternalCacheDir() + File.separator + CacheConstant.IMAGE_CACHE_DIRECTORY);
loaderBuilder.diskCache(new LruDiscCache(cacheDir, DefaultConfigurationFactory.createFileNameGenerator(), 500 * 1024 * 1024));
} catch (IOException e) {
e.printStackTrace();
}
ImageLoader.getInstance().init(loaderBuilder.build());
}
}
示例2: initImageLoader
import com.nostra13.universalimageloader.core.DefaultConfigurationFactory; //导入依赖的package包/类
private void initImageLoader() {
if (options == null) {
DisplayImageOptions.Builder displayBuilder = new DisplayImageOptions.Builder();
displayBuilder.cacheInMemory(true);
displayBuilder.cacheOnDisk(true);
displayBuilder.showImageOnLoading(R.drawable.default_photo);
displayBuilder.showImageForEmptyUri(R.drawable.default_photo);
displayBuilder.considerExifParams(true);
displayBuilder.bitmapConfig(Bitmap.Config.RGB_565);
displayBuilder.imageScaleType(ImageScaleType.EXACTLY);
displayBuilder.displayer(new FadeInBitmapDisplayer(300));
options = displayBuilder.build();
}
if (!ImageLoader.getInstance().isInited()) {
ImageLoaderConfiguration.Builder loaderBuilder = new ImageLoaderConfiguration.Builder(getApplication());
loaderBuilder.memoryCacheSize(getMemoryCacheSize());
try {
File cacheDir = new File(getExternalCacheDir() + File.separator + CacheConstant.IMAGE_CACHE_DIRECTORY);
loaderBuilder.diskCache(new LruDiscCache(cacheDir, DefaultConfigurationFactory.createFileNameGenerator(), 500 * 1024 * 1024));
} catch (IOException e) {
e.printStackTrace();
}
ImageLoader.getInstance().init(loaderBuilder.build());
}
}
示例3: LimitedAgeDiscCache
import com.nostra13.universalimageloader.core.DefaultConfigurationFactory; //导入依赖的package包/类
public LimitedAgeDiscCache(File cacheDir, long maxAge) {
this(cacheDir, null, DefaultConfigurationFactory.createFileNameGenerator(), maxAge);
}
示例4: BaseDiscCache
import com.nostra13.universalimageloader.core.DefaultConfigurationFactory; //导入依赖的package包/类
public BaseDiscCache(File cacheDir, File reserveCacheDir) {
this(cacheDir, reserveCacheDir, DefaultConfigurationFactory.createFileNameGenerator());
}
示例5: LimitedAgeDiskCache
import com.nostra13.universalimageloader.core.DefaultConfigurationFactory; //导入依赖的package包/类
public LimitedAgeDiskCache(File cacheDir, long maxAge) {
this(cacheDir, null, DefaultConfigurationFactory.createFileNameGenerator(), maxAge);
}
示例6: BaseDiskCache
import com.nostra13.universalimageloader.core.DefaultConfigurationFactory; //导入依赖的package包/类
public BaseDiskCache(File cacheDir, File reserveCacheDir) {
this(cacheDir, reserveCacheDir, DefaultConfigurationFactory.createFileNameGenerator());
}
示例7: LimitedAgeDiscCache
import com.nostra13.universalimageloader.core.DefaultConfigurationFactory; //导入依赖的package包/类
public LimitedAgeDiscCache(File file, long l)
{
this(file, null, DefaultConfigurationFactory.createFileNameGenerator(), l);
}
示例8: BaseDiscCache
import com.nostra13.universalimageloader.core.DefaultConfigurationFactory; //导入依赖的package包/类
public BaseDiscCache(File file, File file1)
{
this(file, file1, DefaultConfigurationFactory.createFileNameGenerator());
}
示例9: BaseDiscCache
import com.nostra13.universalimageloader.core.DefaultConfigurationFactory; //导入依赖的package包/类
public BaseDiscCache(File cacheDir) {
this(cacheDir, DefaultConfigurationFactory.createFileNameGenerator());
}
示例10: UnlimitedDiscCache
import com.nostra13.universalimageloader.core.DefaultConfigurationFactory; //导入依赖的package包/类
/** @param cacheDir Directory for file caching */
public UnlimitedDiscCache(File cacheDir) {
this(cacheDir, DefaultConfigurationFactory.createFileNameGenerator());
}
示例11: LimitedAgeDiskCache
import com.nostra13.universalimageloader.core.DefaultConfigurationFactory; //导入依赖的package包/类
/**
* @param cacheDir Directory for file caching
* @param maxAge Max file age (in seconds). If file age will exceed this value then it'll be removed on next
* treatment (and therefore be reloaded).
*/
public LimitedAgeDiskCache(File cacheDir, long maxAge) {
this(cacheDir, null, DefaultConfigurationFactory.createFileNameGenerator(), maxAge);
}
示例12: BaseDiskCache
import com.nostra13.universalimageloader.core.DefaultConfigurationFactory; //导入依赖的package包/类
/**
* @param cacheDir Directory for file caching
* @param reserveCacheDir null-ok; Reserve directory for file caching. It's used when the primary directory isn't available.
*/
public BaseDiskCache(File cacheDir, File reserveCacheDir) {
this(cacheDir, reserveCacheDir, DefaultConfigurationFactory.createFileNameGenerator());
}
示例13: LimitedAgeDiscCache
import com.nostra13.universalimageloader.core.DefaultConfigurationFactory; //导入依赖的package包/类
/**
* @param cacheDir Directory for file caching
* @param maxAge Max file age (in seconds). If file age will exceed this value then it'll be removed on next
* treatment (and therefore be reloaded).
*/
public LimitedAgeDiscCache(File cacheDir, long maxAge) {
this(cacheDir, null, DefaultConfigurationFactory.createFileNameGenerator(), maxAge);
}
示例14: BaseDiscCache
import com.nostra13.universalimageloader.core.DefaultConfigurationFactory; //导入依赖的package包/类
/**
* @param cacheDir Directory for file caching
* @param reserveCacheDir null-ok; Reserve directory for file caching. It's used when the primary directory isn't available.
*/
public BaseDiscCache(File cacheDir, File reserveCacheDir) {
this(cacheDir, reserveCacheDir, DefaultConfigurationFactory.createFileNameGenerator());
}