I have the following code to load an image in Picasso, using a drawable for the placeholder to display while the image is downloading. What I want though is an animated spin
I found answer to this question!
See: https://github.com/square/picasso/issues/427#issuecomment-266276253
In addition to answer of @DBragion, try below.
Now we can fix height and width!
image_view.scaleType = ImageView.ScaleType.CENTER_INSIDE
picasso.load(your_path)
.fit()
.centerCrop()
.noFade()
.placeholder(R.drawable. progress_animation)
.into(image_view)
I think there are two key points.
use noFade()
set image_view's scaleType to "CENTER_INSIDE"