Java Code Examples for com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer

The following examples show how to use com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source Project: candybar   Author: zixpo   File: RequestAdapter.java    License: Apache License 2.0 6 votes vote down vote up
public RequestAdapter(@NonNull Context context, @NonNull List<Request> requests, int spanCount) {
    mContext = context;
    mRequests = requests;
    mTextColorSecondary = ColorHelper.getAttributeColor(mContext,
            android.R.attr.textColorSecondary);
    mTextColorAccent = ColorHelper.getAttributeColor(mContext, R.attr.colorAccent);
    mSelectedItems = new SparseBooleanArray();

    mShowShadow = (spanCount == 1);
    mShowPremiumRequest = Preferences.get(mContext).isPremiumRequestEnabled();
    mShowRegularRequest = Preferences.get(mContext).isRegularRequestLimit();

    mOptions = ImageConfig.getRawDefaultImageOptions();
    mOptions.resetViewBeforeLoading(true);
    mOptions.cacheInMemory(true);
    mOptions.cacheOnDisk(false);
    mOptions.showImageOnFail(R.drawable.ic_app_default);
    mOptions.displayer(new FadeInBitmapDisplayer(700));
}
 
Example #2
Source Project: candybar   Author: zixpo   File: IconsAdapter.java    License: Apache License 2.0 6 votes vote down vote up
public IconsAdapter(@NonNull Context context, @NonNull List<Icon> icons, boolean search, Fragment fragment) {
    mContext = context;
    mFragment = fragment;
    mIcons = icons;
    mIsShowIconName = mContext.getResources().getBoolean(R.bool.show_icon_name);
    if (search) {
        mIconsAll = new ArrayList<>();
        mIconsAll.addAll(mIcons);
    }

    mOptions = ImageConfig.getRawDefaultImageOptions();
    mOptions.resetViewBeforeLoading(true);
    mOptions.cacheInMemory(true);
    mOptions.cacheOnDisk(false);
    mOptions.displayer(new FadeInBitmapDisplayer(700));
}
 
Example #3
Source Project: ChatView   Author: shrikanth7698   File: App.java    License: MIT License 6 votes vote down vote up
@Override
public void onCreate() {
    super.onCreate();

    // UNIVERSAL IMAGE LOADER SETUP
    DisplayImageOptions defaultOptions = new DisplayImageOptions.Builder()
            .resetViewBeforeLoading(true)
            .cacheOnDisk(true)
            .cacheInMemory(true)
            .imageScaleType(ImageScaleType.EXACTLY)
            .displayer(new FadeInBitmapDisplayer(300))
            .build();

    ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(getApplicationContext())
            .defaultDisplayImageOptions(defaultOptions)
            .memoryCache(new WeakMemoryCache())
            .diskCacheSize(100 * 1024 * 1024)
            .build();

    ImageLoader.getInstance().init(config);
    // END - UNIVERSAL IMAGE LOADER SETUP
}
 
Example #4
Source Project: wallpaperboard   Author: danimahardhika   File: WallpapersAdapter.java    License: Apache License 2.0 6 votes vote down vote up
public WallpapersAdapter(@NonNull Context context, @NonNull List<Wallpaper> wallpapers,
                         boolean isFavoriteMode, boolean isSearchMode) {
    mContext = context;
    mWallpapers = wallpapers;
    mIsFavoriteMode = isFavoriteMode;
    WallpaperBoardApplication.sIsClickable = true;

    if (isSearchMode) {
        mWallpapersAll = new ArrayList<>();
        mWallpapersAll.addAll(mWallpapers);
    }

    mOptions = ImageConfig.getRawDefaultImageOptions();
    mOptions.resetViewBeforeLoading(true);
    mOptions.cacheInMemory(true);
    mOptions.cacheOnDisk(true);
    mOptions.displayer(new FadeInBitmapDisplayer(700));
}
 
Example #5
Source Project: candybar-library   Author: danimahardhika   File: RequestAdapter.java    License: Apache License 2.0 6 votes vote down vote up
public RequestAdapter(@NonNull Context context, @NonNull List<Request> requests, int spanCount) {
    mContext = context;
    mRequests = requests;
    mTextColorSecondary = ColorHelper.getAttributeColor(mContext,
            android.R.attr.textColorSecondary);
    mTextColorAccent = ColorHelper.getAttributeColor(mContext, R.attr.colorAccent);
    mSelectedItems = new SparseBooleanArray();

    mShowShadow = (spanCount == 1);
    mShowPremiumRequest = Preferences.get(mContext).isPremiumRequestEnabled();

    mOptions = ImageConfig.getRawDefaultImageOptions();
    mOptions.resetViewBeforeLoading(true);
    mOptions.cacheInMemory(true);
    mOptions.cacheOnDisk(false);
    mOptions.showImageOnFail(R.drawable.ic_app_default);
    mOptions.displayer(new FadeInBitmapDisplayer(700));
}
 
Example #6
Source Project: XRichText   Author: limedroid   File: UILKit.java    License: Apache License 2.0 6 votes vote down vote up
/**
 * 初始化
 *
 * @param context
 */
private UILKit(Context context) {
    File cacheDir = getDiskCacheDir(context, "img");

    ImageLoaderConfiguration.Builder config = new ImageLoaderConfiguration.Builder(context)
            .threadPriority(Thread.NORM_PRIORITY - 2)
            .denyCacheImageMultipleSizesInMemory()
            .memoryCacheSize(10 * 1024 * 1024)
            .diskCache(new UnlimitedDiskCache(cacheDir))
            .diskCacheFileNameGenerator(new Md5FileNameGenerator())
            .diskCacheSize(50 * 1024 * 1024) // 50 MiB
            .tasksProcessingOrder(QueueProcessingType.LIFO);

    ImageLoader.getInstance().init(config.build());



    picOptions = new DisplayImageOptions.Builder()
            .imageScaleType(ImageScaleType.EXACTLY)
            .cacheOnDisk(false).cacheInMemory(false)
            .resetViewBeforeLoading(true)
            .displayer(new FadeInBitmapDisplayer(500)).build();
}
 
Example #7
Source Project: HPlayer   Author: hezhubo   File: Utility.java    License: Apache License 2.0 6 votes vote down vote up
private static DisplayImageOptions getDisplayImageOptionsFactory(int resId) {
    if (mOptionsMap.containsKey(resId)) {
        return mOptionsMap.get(resId);
    }
    DisplayImageOptions.Builder builder = new DisplayImageOptions.Builder();
    builder.imageScaleType(ImageScaleType.EXACTLY).cacheOnDisk(true)
            .cacheInMemory(true).bitmapConfig(Bitmap.Config.RGB_565)
            .displayer(new FadeInBitmapDisplayer(300));

    if (resId != 0) {
        builder.showImageOnFail(resId).showImageForEmptyUri(resId)
                .showImageOnLoading(resId);
    }
    mOptions = builder.build();
    mOptionsMap.put(resId, mOptions);
    return mOptions;
}
 
Example #8
Source Project: VideoMeeting   Author: inexistence   File: App.java    License: Apache License 2.0 6 votes vote down vote up
private void initLib() {
    // 初始化日志功能, 开启/关闭 日志输出
    L.setLogOpen(AppConstant.LOG_OPEN);

    // 初始化自定义异常捕获
    CrashHandler.getInstance().init(this);

    // 初始化ImageLoader
    // 设置图片显示选项
    DisplayImageOptions displayOp = new DisplayImageOptions.Builder()
            .showImageOnLoading(0)// 图片正在加载时显示的背景
            .cacheInMemory(true)// 缓存在内存中
            .cacheOnDisk(true)// 缓存在磁盘中
            .displayer(new FadeInBitmapDisplayer(300))// 显示渐变动画
            .bitmapConfig(Bitmap.Config.RGB_565) // 设置图片的解码类型
            .considerExifParams(true)// 考虑旋转角
            .build();

    ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(
            getApplicationContext()).defaultDisplayImageOptions(displayOp)
            .denyCacheImageMultipleSizesInMemory()// 不解析多种尺寸
            .build();

    ImageLoader.getInstance().init(config);
}
 
Example #9
Source Project: commonadapter   Author: hehonghui   File: MultiImageActivity.java    License: MIT License 6 votes vote down vote up
/**
 * 初始化UniversalImageLoader
 */
private void configUniversalImageLoader() {
    DisplayImageOptions defaultOptions = new DisplayImageOptions.Builder()
            .cacheInMemory().cacheOnDisc()
            .bitmapConfig(Bitmap.Config.RGB_565)
            .displayer(new FadeInBitmapDisplayer(500))
            .build();

    ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(this).
            diskCacheFileCount(500)
            .diskCacheSize(50 * 1024 * 1024).
                    imageDownloader(new BaseImageDownloader(this, 10 * 1000, 20 * 1000))
            .memoryCacheSize((int) Runtime.getRuntime().maxMemory() / 8)
            .defaultDisplayImageOptions(defaultOptions).build();
    ImageLoader.getInstance().init(config);
}
 
Example #10
Source Project: MutiPhotoChoser   Author: laomengzhu   File: MainActivity.java    License: Mozilla Public License 2.0 6 votes vote down vote up
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());
    }

}
 
Example #11
Source Project: DroidDLNA   Author: offbye   File: ImageDisplay.java    License: GNU General Public License v3.0 6 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.image_display);

	mContext = this;
	options = new DisplayImageOptions.Builder()
			.showImageForEmptyUri(R.drawable.ic_empty)
			.showImageOnFail(R.drawable.ic_error).resetViewBeforeLoading()
			.cacheOnDisc().imageScaleType(ImageScaleType.EXACTLY)
			.bitmapConfig(Bitmap.Config.RGB_565)
			.displayer(new FadeInBitmapDisplayer(300)).build();

	initView();
	initData();
	showImage(mPlayUri);

	addShake();
}
 
Example #12
Source Project: v2ex-daily-android   Author: kyze8439690   File: Application.java    License: Apache License 2.0 6 votes vote down vote up
private void initiImageLoader() {
    DisplayImageOptions options = new DisplayImageOptions.Builder()
            .bitmapConfig(Bitmap.Config.RGB_565)
            .imageScaleType(ImageScaleType.EXACTLY)
            .cacheOnDisc(true)
            .displayer(new FadeInBitmapDisplayer(200))
            .showImageOnLoading(R.drawable.ic_launcher)
            .build();

    File cacheDir;
    if(Environment.getExternalStorageState() == Environment.MEDIA_MOUNTED){
        cacheDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);
    }else{
        cacheDir = getCacheDir();
    }
    ImageLoaderConfiguration.Builder configBuilder = new ImageLoaderConfiguration.Builder(mContext)
            .threadPoolSize(2)
            .memoryCache(new WeakMemoryCache())
            .denyCacheImageMultipleSizesInMemory()
            .discCache(new UnlimitedDiscCache(cacheDir))
            .defaultDisplayImageOptions(options);
    if(BuildConfig.DEBUG){
        configBuilder.writeDebugLogs();
    }
    ImageLoader.getInstance().init(configBuilder.build());
}
 
Example #13
Source Project: fdroidclient   Author: f-droid   File: CategoryController.java    License: GNU General Public License v3.0 6 votes vote down vote up
CategoryController(final Activity activity, LoaderManager loaderManager, View itemView) {
    super(itemView);

    this.activity = activity;
    this.loaderManager = loaderManager;

    appCardsAdapter = new AppPreviewAdapter(activity);

    viewAll = (Button) itemView.findViewById(R.id.view_all_button);
    viewAll.setOnClickListener(onViewAll);

    heading = (TextView) itemView.findViewById(R.id.name);
    image = (FeatureImage) itemView.findViewById(R.id.category_image);
    background = (FrameLayout) itemView.findViewById(R.id.category_background);

    RecyclerView appCards = (RecyclerView) itemView.findViewById(R.id.app_cards);
    appCards.setAdapter(appCardsAdapter);
    appCards.addItemDecoration(new ItemDecorator(activity));

    displayImageOptions = Utils.getDefaultDisplayImageOptionsBuilder()
            .displayer(new FadeInBitmapDisplayer(100, true, true, false))
            .build();
}
 
Example #14
public static void initImageLoader(Context context) {
    UnlimitedDiscCache localUnlimitedDiscCache = new UnlimitedDiscCache(
            new File(GlobalConfig.getFirstStoragePath() + "cache"),
            new File(context.getCacheDir() + File.separator + "imgs"));
    DisplayImageOptions localDisplayImageOptions = new DisplayImageOptions.Builder()
            .resetViewBeforeLoading(true)
            .cacheOnDisk(true)
            .cacheInMemory(true)
            .bitmapConfig(Bitmap.Config.RGB_565)
            .resetViewBeforeLoading(true)
            .displayer(new FadeInBitmapDisplayer(250)).build();
    ImageLoaderConfiguration localImageLoaderConfiguration = new ImageLoaderConfiguration.Builder(context)
            .diskCache(localUnlimitedDiscCache)
            .defaultDisplayImageOptions(localDisplayImageOptions).build();
    ImageLoader.getInstance().init(localImageLoaderConfiguration);
}
 
Example #15
Source Project: flow-android   Author: UWFlow   File: FlowApplication.java    License: MIT License 6 votes vote down vote up
@Override
public void onCreate() {
    super.onCreate();
    Crashlytics.start(this);

    // Do init here
    FlowAsyncClient.init(getApplicationContext());
    DisplayImageOptions defaultOptions = new DisplayImageOptions.Builder()
            .cacheInMemory(true)
            .cacheOnDisc(true)
            .displayer(new FadeInBitmapDisplayer(500))
            .build();
    ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(getApplicationContext())
            .defaultDisplayImageOptions(defaultOptions)
            .build();
    ImageLoader.getInstance().init(config);

    SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
    if (preferences != null) {
        mIsUserLoggedIn = preferences.getBoolean(IS_USER_LOGGED_IN_KEY, false);
    }

    getMixpanel();
}
 
Example #16
Source Project: candybar   Author: zixpo   File: ImageConfig.java    License: Apache License 2.0 5 votes vote down vote up
public static DisplayImageOptions getDefaultImageOptions(boolean cacheOnDisk) {
    DisplayImageOptions.Builder options = new DisplayImageOptions.Builder();
    options.delayBeforeLoading(10)
            .resetViewBeforeLoading(true)
            .bitmapConfig(Bitmap.Config.RGB_565)
            .imageScaleType(ImageScaleType.EXACTLY)
            .displayer(new FadeInBitmapDisplayer(700))
            .cacheOnDisk(cacheOnDisk)
            .cacheInMemory(false);
    return options.build();
}
 
Example #17
Source Project: candybar   Author: zixpo   File: WallpapersAdapter.java    License: Apache License 2.0 5 votes vote down vote up
public WallpapersAdapter(@NonNull Context context, @NonNull List<Wallpaper> wallpapers) {
    mContext = context;
    mWallpapers = wallpapers;
    mIsAutoGeneratedColor = mContext.getResources().getBoolean(
            R.bool.card_wallpaper_auto_generated_color);
    mIsShowName = mContext.getResources().getBoolean(R.bool.wallpaper_show_name_author);

    mOptions = ImageConfig.getRawDefaultImageOptions();
    mOptions.resetViewBeforeLoading(true);
    mOptions.cacheInMemory(true);
    mOptions.cacheOnDisk(true);
    mOptions.displayer(new FadeInBitmapDisplayer(700));
}
 
Example #18
Source Project: YTPlayer   Author: KaustubhPatange   File: Utils.java    License: GNU General Public License v3.0 5 votes vote down vote up
public static void initImageLoader(Context context) {
    DisplayImageOptions options = new DisplayImageOptions.Builder()
            .showImageOnLoading(R.drawable.ic_pulse)
            .showImageForEmptyUri(R.drawable.ic_pulse)
            .showImageOnFail(R.drawable.ic_pulse)
            .imageScaleType(ImageScaleType.IN_SAMPLE_INT)
            .bitmapConfig(Bitmap.Config.ARGB_8888)
            .displayer(new FadeInBitmapDisplayer(500))
            .handler(new Handler()).build();
    ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(context)
            .memoryCache(new WeakMemoryCache()).defaultDisplayImageOptions(options).memoryCacheSizePercentage(13).build();
    ImageLoader.getInstance().init(config);
}
 
Example #19
Source Project: DevUtils   Author: afkT   File: ImageLoaderUtils.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * 获取图片渐变动画加载配置
 * @param options        {@link DisplayImageOptions}
 * @param durationMillis 动画持续时间
 * @return {@link DisplayImageOptions}
 */
public static DisplayImageOptions getFadeInBitmapDisplayer(final DisplayImageOptions options, final int durationMillis) {
    if (options != null) {
        return getBitmapDisplayerOptions(options, new FadeInBitmapDisplayer(durationMillis));
    }
    return options;
}
 
Example #20
Source Project: DMAudioStreamer   Author: dibakarece   File: AdapterMusic.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
    if (loadedImage != null) {
        ImageView imageView = (ImageView) view;
        boolean firstDisplay = !displayedImages.contains(imageUri);
        if (firstDisplay) {
            FadeInBitmapDisplayer.animate(imageView, 200);
            displayedImages.add(imageUri);
        }
    }
    progressEvent(view, true);
}
 
Example #21
Source Project: DMAudioStreamer   Author: dibakarece   File: MusicActivity.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
    if (loadedImage != null) {
        ImageView imageView = (ImageView) view;
        boolean firstDisplay = !displayedImages.contains(imageUri);
        if (firstDisplay) {
            FadeInBitmapDisplayer.animate(imageView, 1000);
            displayedImages.add(imageUri);
        }
    }
    progressEvent(view, true);
}
 
Example #22
Source Project: wallpaperboard   Author: danimahardhika   File: ImageConfig.java    License: Apache License 2.0 5 votes vote down vote up
public static DisplayImageOptions getDefaultImageOptions() {
    DisplayImageOptions.Builder options = new DisplayImageOptions.Builder();
    options.delayBeforeLoading(10)
            .resetViewBeforeLoading(true)
            .bitmapConfig(Bitmap.Config.RGB_565)
            .imageScaleType(ImageScaleType.EXACTLY)
            .displayer(new FadeInBitmapDisplayer(700))
            .cacheOnDisk(true)
            .cacheInMemory(false);
    return options.build();
}
 
Example #23
Source Project: wallpaperboard   Author: danimahardhika   File: CategoriesAdapter.java    License: Apache License 2.0 5 votes vote down vote up
public CategoriesAdapter(@NonNull Context context, @NonNull List<Category> categories) {
    mContext = context;
    mCategories = categories;

    mOptions = ImageConfig.getRawDefaultImageOptions();
    mOptions.resetViewBeforeLoading(true);
    mOptions.cacheInMemory(true);
    mOptions.cacheOnDisk(true);
    mOptions.displayer(new FadeInBitmapDisplayer(700));
}
 
Example #24
Source Project: wallpaperboard   Author: danimahardhika   File: LatestAdapter.java    License: Apache License 2.0 5 votes vote down vote up
public LatestAdapter(@NonNull Context context, @NonNull List<Wallpaper> wallpapers) {
    mContext = context;
    mWallpapers = wallpapers;
    WallpaperBoardApplication.sIsClickable = true;

    mOptions = ImageConfig.getRawDefaultImageOptions();
    mOptions.resetViewBeforeLoading(true);
    mOptions.cacheInMemory(true);
    mOptions.cacheOnDisk(true);
    mOptions.displayer(new FadeInBitmapDisplayer(700));
}
 
Example #25
Source Project: wallpaperboard   Author: danimahardhika   File: WallpaperDetailsCategoryAdapter.java    License: Apache License 2.0 5 votes vote down vote up
public WallpaperDetailsCategoryAdapter(@NonNull Context context, @NonNull List<Category> categories) {
    mContext = context;
    mCategories = categories;

    mOptions = ImageConfig.getRawDefaultImageOptions();
    mOptions.resetViewBeforeLoading(true);
    mOptions.cacheInMemory(true);
    mOptions.cacheOnDisk(true);
    mOptions.displayer(new FadeInBitmapDisplayer(700));
}
 
Example #26
Source Project: JieCaoVideoPlayer-develop   Author: JoeyChow1989   File: DemoApplication.java    License: MIT License 5 votes vote down vote up
public static DisplayImageOptions getDefaultDisplayImageOption() {
        DisplayImageOptions options = new DisplayImageOptions.Builder()
                .showImageOnLoading(new ColorDrawable(Color.parseColor("#f0f0f0")))
                .resetViewBeforeLoading(true)
                .cacheInMemory(true)
                .cacheOnDisk(true)
                .considerExifParams(true)
                .imageScaleType(ImageScaleType.EXACTLY_STRETCHED)
                .bitmapConfig(Bitmap.Config.RGB_565)
                .displayer(new FadeInBitmapDisplayer(500)) // 设置图片渐显的时间
//                .delayBeforeLoading(300)  // 下载前的延迟时间
                .build();
        return options;
    }
 
Example #27
Source Project: candybar-library   Author: danimahardhika   File: ImageConfig.java    License: Apache License 2.0 5 votes vote down vote up
public static DisplayImageOptions getDefaultImageOptions(boolean cacheOnDisk) {
    DisplayImageOptions.Builder options = new DisplayImageOptions.Builder();
    options.delayBeforeLoading(10)
            .resetViewBeforeLoading(true)
            .bitmapConfig(Bitmap.Config.RGB_565)
            .imageScaleType(ImageScaleType.EXACTLY)
            .displayer(new FadeInBitmapDisplayer(700))
            .cacheOnDisk(cacheOnDisk)
            .cacheInMemory(false);
    return options.build();
}
 
Example #28
Source Project: candybar-library   Author: danimahardhika   File: WallpapersAdapter.java    License: Apache License 2.0 5 votes vote down vote up
public WallpapersAdapter(@NonNull Context context, @NonNull List<Wallpaper> wallpapers) {
    mContext = context;
    mWallpapers = wallpapers;
    mIsAutoGeneratedColor = mContext.getResources().getBoolean(
            R.bool.card_wallpaper_auto_generated_color);
    mIsShowName = mContext.getResources().getBoolean(R.bool.wallpaper_show_name_author);

    mOptions = ImageConfig.getRawDefaultImageOptions();
    mOptions.resetViewBeforeLoading(true);
    mOptions.cacheInMemory(true);
    mOptions.cacheOnDisk(true);
    mOptions.displayer(new FadeInBitmapDisplayer(700));
}
 
Example #29
Source Project: candybar-library   Author: danimahardhika   File: IconsAdapter.java    License: Apache License 2.0 5 votes vote down vote up
public IconsAdapter(@NonNull Context context, @NonNull List<Icon> icons, boolean search) {
    mContext = context;
    mIcons = icons;
    mIsShowIconName = mContext.getResources().getBoolean(R.bool.show_icon_name);
    if (search) {
        mIconsAll = new ArrayList<>();
        mIconsAll.addAll(mIcons);
    }

    mOptions = ImageConfig.getRawDefaultImageOptions();
    mOptions.resetViewBeforeLoading(true);
    mOptions.cacheInMemory(true);
    mOptions.cacheOnDisk(false);
    mOptions.displayer(new FadeInBitmapDisplayer(700));
}
 
Example #30
Source Project: BigApp_WordPress_Android   Author: BigAppOS   File: ImageLoaderOptions.java    License: Apache License 2.0 5 votes vote down vote up
private static DisplayImageOptions.Builder getBaseOptions() {
    return new DisplayImageOptions.Builder()
            .showImageForEmptyUri(BaseApplication.sDefaultImageDrawable)
            .showImageOnFail(BaseApplication.sDefaultImageDrawable)
            .showImageOnLoading(BaseApplication.sDefaultImageDrawable)
            .imageScaleType(ImageScaleType.IN_SAMPLE_INT)
            .bitmapConfig(Bitmap.Config.RGB_565).considerExifParams(true)
            .displayer(new FadeInBitmapDisplayer(300));
}