Given:
- A number of images (10 - 15) residing in assets folder (as practice shows, the better approach is to keep high-resolution images in assets)
- Android UI thread (caching drawables in advance is already made in a background thread)
The issue:
Need to display all the images one on another smoothly and not blocking UI thread after the images are drawn.
Already used approaches:
- Dynamically create a required number of
ImageViewand then call.setImageDrawable(). This takes a lot of time but the worst thing is that the UI thread is being blocked even after all the images are drawn on theirImageView. - Create a
LayerDrawableobject and pass as argument an array of the requiredDrawables. Then put it on anImageViewalso by calling.setImageDrawable(). This option behaves the same like the one described above.
Is there a way to solve this issue? Or Android devices not capable to cope with it?
Try Picasso library:
It has support for resources: