Android universal image loader unable to display image in exact size.(Large size images)

305 views Asked by At

Hi I trying to load and display large size image using universal image loader. My load config and display config are as follow :

  File cacheDir = StorageUtils.getCacheDirectory(this);

    ImageLoader loader = ImageLoader.getInstance();

    DisplayImageOptions opts = new DisplayImageOptions.Builder().imageScaleType(ImageScaleType.EXACTLY).build();


    ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(this)
            .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(this)) // default
        .imageDecoder(new BaseImageDecoder(true)) // default

        .defaultDisplayImageOptions(opts) // default

        .writeDebugLogs()
        .build();


    loader.init(config);



    loader.displayImage("abc.com/images/7_23.jpg", imageView, opts);

My image size is too high so I am also using android:hardwareAccelerated="false" it is displaying image without any error but only thing it is not in proper form. I am mean it looking blurred. Am I doing anything wrong? Need some help about it. Thank you.

0

There are 0 answers