Search code examples
androiduniversal-image-loader

Universal Image Loader inSampleSize option


I'm using Uinversal Image Loader in my application, I need to load the images inSampleSize, how to do that? I read this from the author

Added DecodingType parameter for DisplayImageOptions

but I'm not figuring out to do, a snipped code would be great! Thanks!


Solution

  • DecodingType was renamed to ImageScaleType long time ago. ImageScaleType has next options:

    • NONE (inSampleSize = 1)
    • IN_SAMPLE_POWER_OF_2 (inSampleSize = 1,2,4,8,16,...)
    • IN_SAMPLE_INT (inSampleSize = 1,2,3,4,5,...)
    • EXACTLY (bitmap will be scaled exactly for ImageView size)
    • EXACTLY_STRETCHED (if image is smaller than ImageView then it will be stretched)