Android UniversalImageLoader vs Picasso

In android there are 2 Image loading and caching libararies is UniversalImageLoader and Picasso.
Today, I will present an example of using both of them and giving some comparisons.

1. Download 2 libaries newest version from official sites:
- UniversalImageLoader (UIL):
- Picasso:

2. Start Eclipse and create a new android project.

3. Put downloaded jars file to libs folder:

4. Start coding:

Declaring activity_main.xml for layout:
In MainActivity, we should customize 2 libraries loading image process.
For UIL, like documents, we must make configuration before using it. Initializing method code:
And now, write loading image from url method (customize loading process):
Full MainActivity code:
5. Open your AndroidManifest.xml file and add internet connect permission:

<uses-permission android:name="android.permission.INTERNET" />

6. Running program and these are some result screens (click for full size):
pic name pic name pic name

My conclusions:

    Both of these libraries have been around for long and have reached good stability and maturity. In general, Picasso is good for small projects where you just need to load images and not worry about the underlying process. Universal Image Loader on the other hand is good for medium to big projects. It is highly customizable and provides lot of control. Although It wants you to know the underlying process in order to work properly. If you are beginner, I would stay stick with Picasso Library. Only move to UIL if you need more control and can handle occasional memory errors.
There are other similar libraries available too like Volley,UrlImageViewHelper and Novoda. All of these have their own way of doing things but in the end they produce similar results. If you got time, I would suggest you to take a look at them and use the one which best suites your project.
(sorry for having ads at download link)


Previous post
« Prev Post
Next post
Next Post »