Picasso isn't loading scrolled images efficiently?
First of all I suggest you to use RecyclerView
with GridLayoutManager
or StaggeredGridLayoutManager
. It must be more effective and view itself contain less bugs.
Next, use OkHttp with Picasso. It's more stable, powerful and consistent http client. And I think most important to you configure memory/file cache.
// Create a cache using an appropriate portion of the available RAM
Cache memoryCache = new LruCache(getApplicationContext());
// Use OkHttp as downloader
Downloader downloader = new OkHttpDownloader(getApplicationContext(),
PICASSO_DISK_CACHE_SIZE);
mPicasso = new Picasso.Builder(getApplicationContext())
.downloader(downloader).memoryCache(memoryCache).build();
Speed of loading also depend on network condition and image size.
Picasso Taking time to load images
fit()
needs to wait for the size of the ImageView
to be determined before it can size the image to match, and the size can't be calculated until the end of the layout pass. You might get quicker results by using resize()
if you are able to predict reasonable width and height values.
You might also want to look at the Glide library as it takes a different approach to caching that can be quicker than Picasso in some cases, for example instead of caching full size images it caches the resized ones. However, there are many pros and cons to both libraries; although the syntaxes are very similar, some things that work in Picasso will not work in Glide, and vice versa.
Related Topics
Why Comparing Integer with Int Can Throw Nullpointerexception in Java
Boolean[] VS. Bitset: Which Is More Efficient
How to Get the Memory Location of a Object in Java
Reading in from System.In - Java
What Would an Ast (Abstract Syntax Tree) for an Object-Oriented Programming Language Look Like
How to Delete Files Programmatically on Android
Fragment Add or Replace Not Working
How to Simulate Low Memory in the Android Emulator
Is Dalvik's Memory Model the Same as Java'S
How to Send Array of Params Using Volley in Android
Firebase Database Points to Wrong Database Url
== and .Equals() Not Working in Java
Nullpointerexception on Button.Findviewbyid()
Get Current Time in a Given Timezone:Android