Search code examples
androiduniversal-image-loader

What happens to other views in Universal Image Loader


I am learning Universal Image Loader lib and I ran into some learners doubt for which I can't seem to find any documentation. My question is, that in a very long gridview I am displaying images along with some other text and I know the images are getting cached on disk. But what about the img descriptions, counts, votes, other texts in view. Are they getting first re-downloaded everytime and then getting inflated I scroll back up or they getting cached too? Will it cause any performance issue?


Solution

  • Server would give text descriptions along with image url. The image would be loaded by UIL with the url, right? All of them could be put in ArrayList sequentially, it will be consumed by Adapter, and finally the adapter will be plugged into GridView.

    Texts will be holded in local database or in-memory by ArrayList. So, it does not need to be re-downloaded as data already in device memory. Generally, it does not give performance issue as text input/output is very timid overload than displaying image process. Your array can be more than a length of hundreds and it also does not give performance issue in current devices.

    Note that, UIL utilizes image cache not only on the disk, but also in-memory.