Reputation: 11
I have a firebase database in which multiple urls of images are stored all images have different byte size , but picasso not load all images , just some images loads. i am saving all images after crop, how can i fix issue?
Picasso.get()
.load(user_pic)
.networkPolicy(NetworkPolicy.OFFLINE) // for offline
.placeholder(R.drawable.default_profile_image)
.error(R.drawable.default_profile_image)
.into(dpImage);
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/profileImage"
android:layout_width="170dp"
android:layout_height="170dp"
android:maxWidth="170dp"
android:maxHeight="170dp"
android:src="@drawable/default_profile_image"
app:civ_border_color="@color/colorPrimary"
app:civ_border_width="0.5dp"
/>
Upvotes: 0
Views: 93
Reputation: 99
You can enable logging in Picasso to see what is happening.
You can find more info here: https://futurestud.io/tutorials/picasso-cache-indicators-logging-stats
Anyways, from my personal experience, I recommend switch to Glide: https://github.com/bumptech/glide
Upvotes: 1
Reputation: 1
//Setting it to (6MB)..change it as per requirement
long cacheSize = 1024 * 1024 * 6;
Picasso picasso = new Picasso.Builder(context)
.memoryCache(new LruCache(cacheSize))
.build();
You can try increasing the cache size of picasso
if it still not work use Glide
it can handle different formats of images better.
Upvotes: 0