Search code examples
androiduniversal-image-loader

How to change the displayer of UniversalImageLoader?


This should be very simple thing to do, but I can't find it. I want to show at some places in my app images with rounded corners. But not all.

The only place where the I see I can set the display is in the initial setup. Can't find other method. And I can't overwrite the initial setup, since it's set only when the configuration is null. I also don't find a method to change it in the DisplayImageOptions object used at initialization.

What do I do to change between rounded and not-rounded corners? Thanks in advance.

If necessary, this is the library I'm talking about: https://github.com/nostra13/Android-Universal-Image-Loader


Solution

  • You can configure displayer in DisplayImageOptions, and you can customize DisplayImageOptions for every displayImage(...) call (just pass it to method).

    When you don't pass DisplayImageOptions to displayImage(...) then default options from configuration are used (.defaultDisplayImageOptions(...)).