com.nostra13.universalimageloader.core.display.SimpleBitmapDisplayer Java Examples

The following examples show how to use com.nostra13.universalimageloader.core.display.SimpleBitmapDisplayer. 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 File: TitlePopupMenu.java    From letv with Apache License 2.0 6 votes vote down vote up
@SuppressLint({"InflateParams"})
public TitlePopupMenu(Context context, int width, int height) {
    this.LIST_PADDING = 10;
    this.mRect = new Rect();
    this.mLocation = new int[2];
    this.popupGravity = 0;
    this.menus = new ArrayList();
    this.menusAdapter = new MenusAdapter();
    this.mContext = context;
    this.options = new Builder().showImageOnLoading(R.drawable.lemallsdk_icon_default).showImageForEmptyUri(R.drawable.lemallsdk_icon_default).showImageOnFail(R.drawable.lemallsdk_icon_default).cacheInMemory(true).cacheOnDisc(true).bitmapConfig(Config.RGB_565).imageScaleType(ImageScaleType.IN_SAMPLE_INT).displayer(new SimpleBitmapDisplayer()).build();
    setFocusable(true);
    setTouchable(true);
    setOutsideTouchable(true);
    this.mScreenWidth = ScreenUtil.getScreenWidth(this.mContext);
    this.mScreenHeight = ScreenUtil.getScreenHeight(this.mContext);
    setWidth(width);
    setHeight(height);
    setAnimationStyle(R.style.AnimationPreview);
    update();
    setBackgroundDrawable(new BitmapDrawable());
    setContentView(LayoutInflater.from(this.mContext).inflate(R.layout.lemallsdk_title_popup_menu, null));
    initUI();
}
 
Example #2
Source File: AsyncImageView.java    From GithubTrends with Apache License 2.0 6 votes vote down vote up
protected void executeLoadImage() {

        if (TextUtils.isEmpty(url)) {
            setImageResource(R.drawable.image_loading_resource);
        } else {

            DisplayImageOptions.Builder builder = new DisplayImageOptions.Builder()
                    .showImageOnLoading(R.drawable.image_loading_resource)
                    .cacheInMemory(true)
                    .cacheOnDisk(true)
                    .displayer(new SimpleBitmapDisplayer());

            DisplayImageOptions options = builder.build();
            ImageLoader.getInstance().displayImage(url, this, options, imageLoadingListener);
        }
    }
 
Example #3
Source File: BaseDataAdapter.java    From WliveTV with Apache License 2.0 6 votes vote down vote up
public BaseDataAdapter(Context context, List<? extends BmobObject> mDatas) {
    this.context = context;
    this.mDatas = mDatas;
    options = new DisplayImageOptions.Builder()
                    .showImageOnLoading(R.mipmap.icon_live_item_default)
            .showImageForEmptyUri(R.mipmap.icon_live_item_default)
            .showImageOnFail(R.mipmap.icon_live_item_default)
            .cacheInMemory(false)
            .cacheOnDisk(true)
            .considerExifParams(true)
            .bitmapConfig(Bitmap.Config.RGB_565)
            .displayer(new SimpleBitmapDisplayer())
            .imageScaleType(ImageScaleType.EXACTLY_STRETCHED)
            .build();
    if (this.context == null) {
        System.out.println("this.context is null");
    } else {
        mlayoutInflate = LayoutInflater.from(this.context);
    }
}
 
Example #4
Source File: PickerImageLoadTool.java    From o2oa with GNU Affero General Public License v3.0 5 votes vote down vote up
public static void disPlay(String uri, ImageAware imageAware, int defaultPic){
	DisplayImageOptions options = new DisplayImageOptions.Builder()
	.showImageOnLoading(defaultPic)
	.showImageForEmptyUri(defaultPic)
	.showImageOnFail(defaultPic)
	.cacheInMemory(true)
	.cacheOnDisc(false)
	.bitmapConfig(Bitmap.Config.RGB_565)
	.displayer(new SimpleBitmapDisplayer())
	.build();

	imageLoader.displayImage(uri, imageAware, options);
}
 
Example #5
Source File: UniversalImageLoader.java    From UltimateAndroid with Apache License 2.0 5 votes vote down vote up
/**
 * Return default DisplayImageOptions.Builder
 * @return
 */
public static DisplayImageOptions.Builder getDefaultImageOptionsBuilder() {
    DisplayImageOptions.Builder builder = new DisplayImageOptions.Builder()
            .resetViewBeforeLoading(false)  // default
                    //  .delayBeforeLoading(1000)
          //  .showImageOnLoading(R.drawable.titanic_wave_black)
            .considerExifParams(false) // default
            .imageScaleType(ImageScaleType.IN_SAMPLE_POWER_OF_2) // default
            .bitmapConfig(Bitmap.Config.ARGB_8888) // default
            .displayer(new SimpleBitmapDisplayer()) // default
            .handler(new Handler()) // default
            .cacheInMemory(true)
            .cacheOnDisk(true);
    return builder;
}
 
Example #6
Source File: UniversalImageLoader.java    From UltimateAndroid with Apache License 2.0 5 votes vote down vote up
public static DisplayImageOptions.Builder getDefaultImageOptionsBuilder() {
    DisplayImageOptions.Builder builder = new DisplayImageOptions.Builder()
            .resetViewBeforeLoading(false)  // default
                    //  .delayBeforeLoading(1000)
            .showImageOnLoading(R.drawable.titanic_wave_black)
            .considerExifParams(false) // default
            .imageScaleType(ImageScaleType.IN_SAMPLE_POWER_OF_2) // default
            .bitmapConfig(Bitmap.Config.ARGB_8888) // default
            .displayer(new SimpleBitmapDisplayer()) // default
            .handler(new Handler()) // default
            .cacheInMemory(true)
            .cacheOnDisc(true);
    return builder;
}
 
Example #7
Source File: ImageLibUitls.java    From BigApp_Discuz_Android with Apache License 2.0 5 votes vote down vote up
public static DisplayImageOptions getDisplayImageOptions(Drawable drawableEmpty, Drawable drawableFail) {
    DisplayImageOptions options = new DisplayImageOptions.Builder()
            .resetViewBeforeLoading(false).delayBeforeLoading(100)
            .considerExifParams(false)
            .imageScaleType(ImageScaleType.IN_SAMPLE_INT)
            .bitmapConfig(Bitmap.Config.RGB_565)
            .displayer(new SimpleBitmapDisplayer()).handler(new Handler())
            .cacheInMemory(true).cacheOnDisk(true)
            .showImageForEmptyUri(drawableEmpty)
            .showImageOnFail(drawableFail)
            .build();
    return options;

}
 
Example #8
Source File: ImageLibUitls.java    From BigApp_Discuz_Android with Apache License 2.0 5 votes vote down vote up
public static DisplayImageOptions getDefaultDisplayImageOptions() {
        DisplayImageOptions options = new DisplayImageOptions.Builder()
                .resetViewBeforeLoading(false).delayBeforeLoading(100)
                .considerExifParams(false)
                .imageScaleType(ImageScaleType.IN_SAMPLE_INT)
                .bitmapConfig(Bitmap.Config.RGB_565)
                .displayer(new SimpleBitmapDisplayer()).handler(new Handler())
                .cacheInMemory(true).cacheOnDisk(true)
//                .showImageForEmptyUri(R.drawable.default_pic)
//                .showImageOnFail(R.drawable.default_pic)
                .build();
        return options;

    }
 
Example #9
Source File: ImageBaseUtils.java    From BigApp_Discuz_Android with Apache License 2.0 5 votes vote down vote up
public static DisplayImageOptions getDefaultDisplayImageOptions() {
        DisplayImageOptions options = new DisplayImageOptions.Builder()
                .resetViewBeforeLoading(false).delayBeforeLoading(100)
                .considerExifParams(false)
                .imageScaleType(ImageScaleType.IN_SAMPLE_INT)
                .bitmapConfig(Bitmap.Config.RGB_565)
                .displayer(new SimpleBitmapDisplayer()).handler(new Handler())
                .cacheInMemory(true).cacheOnDisk(true)
//                .showImageForEmptyUri(R.drawable.default_pic)
//                .showImageOnFail(R.drawable.default_pic)
                .build();
        return options;

    }
 
Example #10
Source File: ImageUtils.java    From BigApp_Discuz_Android with Apache License 2.0 5 votes vote down vote up
/**
     * 初始化 ImageLoader
     *
     * @param context
     */
    public static ImageLoader initNoCacheImageLoader(Context context) {



        DisplayImageOptions options = new DisplayImageOptions.Builder()
                .resetViewBeforeLoading(false).delayBeforeLoading(100)
                .considerExifParams(false)
                .imageScaleType(ImageScaleType.IN_SAMPLE_INT)
                .bitmapConfig(Bitmap.Config.RGB_565)
                .displayer(new SimpleBitmapDisplayer()).handler(new Handler())
                .cacheInMemory(false).cacheOnDisk(false)
//                .showImageForEmptyUri(R.drawable.default_pic)
//                .showImageOnFail(R.drawable.default_pic)
                .build();


        ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(
                context.getApplicationContext())
                .threadPoolSize(10)
                .threadPriority(Thread.NORM_PRIORITY - 2)
                .tasksProcessingOrder(QueueProcessingType.FIFO)
                .denyCacheImageMultipleSizesInMemory()
                .memoryCache(new UsingFreqLimitedMemoryCache(3 * 1024 * 1024))
                .imageDownloader(
                        new BaseImageDownloader(context.getApplicationContext()))
                .defaultDisplayImageOptions(options)
//                .writeDebugLogs()
                .build();


        ImageLoader imageLoader = ImageLoader.getInstance();
        imageLoader.init(config);

        return imageLoader;

    }
 
Example #11
Source File: ImageUtils.java    From BigApp_Discuz_Android with Apache License 2.0 5 votes vote down vote up
public static DisplayImageOptions getAvatarDisplayImageOptions() {
    DisplayImageOptions options = new DisplayImageOptions.Builder()
            .resetViewBeforeLoading(false).delayBeforeLoading(100)
            .considerExifParams(false)
            .imageScaleType(ImageScaleType.IN_SAMPLE_INT)
            .bitmapConfig(Bitmap.Config.RGB_565)
            .displayer(new SimpleBitmapDisplayer()).handler(new Handler())
            .cacheInMemory(true).cacheOnDisk(true)
            .showImageForEmptyUri(R.drawable.ic_protrait_solid)
            .showImageOnFail(R.drawable.ic_protrait_solid)
            .build();
    return options;

}
 
Example #12
Source File: ImageUtils.java    From BigApp_Discuz_Android with Apache License 2.0 5 votes vote down vote up
public static DisplayImageOptions getDefaultDisplayImageOptions() {
        DisplayImageOptions options = new DisplayImageOptions.Builder()
                .resetViewBeforeLoading(false).delayBeforeLoading(100)
                .considerExifParams(false)
                .imageScaleType(ImageScaleType.IN_SAMPLE_INT)
                .bitmapConfig(Bitmap.Config.RGB_565)
                .displayer(new SimpleBitmapDisplayer()).handler(new Handler())
                .cacheInMemory(true).cacheOnDisk(true)
//                .showImageForEmptyUri(R.drawable.default_pic)
//                .showImageOnFail(R.drawable.default_pic)
                .build();
        return options;

    }
 
Example #13
Source File: DefaultConfigurationFactory.java    From mobile-manager-tool with MIT License 4 votes vote down vote up
/** Creates default implementation of {@link com.nostra13.universalimageloader.core.display.BitmapDisplayer} - {@link com.nostra13.universalimageloader.core.display.SimpleBitmapDisplayer} */
public static BitmapDisplayer createBitmapDisplayer() {
	return new SimpleBitmapDisplayer();
}
 
Example #14
Source File: DefaultConfigurationFactory.java    From BigApp_WordPress_Android with Apache License 2.0 4 votes vote down vote up
/** Creates default implementation of {@link BitmapDisplayer} - {@link SimpleBitmapDisplayer} */
public static BitmapDisplayer createBitmapDisplayer() {
	return new SimpleBitmapDisplayer();
}
 
Example #15
Source File: DefaultConfigurationFactory.java    From WliveTV with Apache License 2.0 4 votes vote down vote up
/** Creates default implementation of {@link BitmapDisplayer} - {@link SimpleBitmapDisplayer} */
public static BitmapDisplayer createBitmapDisplayer() {
	return new SimpleBitmapDisplayer();
}
 
Example #16
Source File: LetvCacheMannager.java    From letv with Apache License 2.0 4 votes vote down vote up
private BitmapDisplayer getDisplayer() {
    if (VERSION.SDK_INT >= 9) {
        return new FadeInBitmapDisplayer(200);
    }
    return new SimpleBitmapDisplayer();
}
 
Example #17
Source File: DefaultConfigurationFactory.java    From MiBandDecompiled with Apache License 2.0 4 votes vote down vote up
public static BitmapDisplayer createBitmapDisplayer()
{
    return new SimpleBitmapDisplayer();
}
 
Example #18
Source File: LetvCacheMannager.java    From letv with Apache License 2.0 4 votes vote down vote up
public void init(Context context, LetvThumbnailUtils letvThumbnailUtils) {
    LetvCacheConfiguration.initCacheLibrary(context, letvThumbnailUtils);
    this.options = new Builder().cacheInMemory(true).cacheOnDisk(true).resetViewBeforeLoading(false).displayer(new SimpleBitmapDisplayer()).bitmapConfig(Config.RGB_565).imageScaleType(ImageScaleType.IN_SAMPLE_POWER_OF_2).build();
}
 
Example #19
Source File: DefaultConfigurationFactory.java    From letv with Apache License 2.0 4 votes vote down vote up
public static BitmapDisplayer createBitmapDisplayer() {
    return new SimpleBitmapDisplayer();
}
 
Example #20
Source File: DefaultConfigurationFactory.java    From candybar with Apache License 2.0 4 votes vote down vote up
/**
 * Creates default implementation of {@link BitmapDisplayer} - {@link SimpleBitmapDisplayer}
 */
public static BitmapDisplayer createBitmapDisplayer() {
    return new SimpleBitmapDisplayer();
}
 
Example #21
Source File: DefaultConfigurationFactory.java    From android-open-project-demo with Apache License 2.0 4 votes vote down vote up
/** Creates default implementation of {@link BitmapDisplayer} - {@link SimpleBitmapDisplayer} */
public static BitmapDisplayer createBitmapDisplayer() {
	return new SimpleBitmapDisplayer();
}
 
Example #22
Source File: DefaultConfigurationFactory.java    From Android-Universal-Image-Loader-Modify with Apache License 2.0 2 votes vote down vote up
/**
 * Creates default implementation of {@link BitmapDisplayer} - {@link SimpleBitmapDisplayer}
 * 创建图片默认的显示器
 */
public static BitmapDisplayer createBitmapDisplayer() {
	return new SimpleBitmapDisplayer();
}