Picasso allows me to resize an image. Is there a mechanism for resizing the placeholder? The following is not sufficient. What am I missing?
Picasso.with(mContext).load(url).placeholder(R.drawable.imageview_holder).resize(200, 200).into(imageview);
Image Resizing with resize(x, y) This will resize the image before displaying it in the ImageView .
Just call . placeHolder() with a reference to a drawable (resource) and Picasso will display that as a placeholder until your actual image is ready.
Image loading using Picasso is very easy, you can do it like this way Picasso. get(). load("http://i.imgur.com/DvpvklR.png").into(imageView); and in their website you can get every details. In your case you can parse every image URL and use RecyclerView to show them along with Picasso.
What I found that works for me is to resize the placeholder (and error image) directly with the ImageView using android:scaleType="fitCenter"
in the XML. Then I can still use Picasso to resize and center the downloaded image.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With