Testing picasso image library

Testing picasso image library on android app

How to on installing the picasso third party library and testing the performance improvement.

This is part 1 of the android tutorial performance series. We look for a quick and fast solution with testing Picasso image library.
It’s mainly a convenience library for downloading images from the internet but also has caching support which we will be looking to use to improve the performance of the recyclerview image gallery application.

Steps

Install picasso library using gradle

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:recyclerview-v7:21.0.+'
    compile 'com.squareup.picasso:picasso:2.5.2'
}

Sync project with Gradle Files

Call the Gradle API

Picasso.with(holder.getImageView().getContext())
            .load(imageFile)
            .into(holder.getImageView());

Run the code on the android device

About The Author
-

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>