Reputation: 1104
I'm creating an android application in which I'm using Picasso jar to load the image from JSON, Here some images are displayed in a wrong orientation. Not every image, but only some. Can you please help me overcome this issue:
Picasso.with(Sell_Preview_Activity.this)
.load(Httppost_Links.imagePath
+ ConstantVariables.sellDetails_stringURL)
.networkPolicy(NetworkPolicy.NO_CACHE)
.memoryPolicy(MemoryPolicy.NO_CACHE)
.into(view_imageView, new com.squareup.picasso.Callback() {
@Override
public void onSuccess() {
if (progressBar != null) {
Log.i("image loading success",
"image loading success ");
progressBar1.setVisibility(View.GONE);
}
}
@Override
public void onError() {
}
});
Upvotes: 3
Views: 2186
Reputation: 2088
Improvising on the answer put forward by Zhli, have you tried the other options available in the same link :
Upvotes: 0
Reputation: 380
I didn't come across such issue.
But I suspect that it may due to your ImageView's height and width.
you could call .resize(100, 100)
or .fit()
hope this could help you
https://futurestud.io/blog/picasso-image-resizing-scaling-and-fit/
Upvotes: 2