CenterCrop() is a cropping method that scales the image so that it fills in the requested borders of the ImageView , and then crop the excess. ImageView will fill out completely, but the entire image may not be displayed.
Picasso .with(context) .load(UsageExampleListViewAdapter.eatFoodyImages[0]) .resize(600, 200)
CenterInside() is a cropping method that scales the image so that both dimensions are equal to or less than the requested ImageView borders. The image will be displayed in full, but may not fill the entire ImageView .
Picasso .with(context) .load(UsageExampleListViewAdapter.eatFoodyImages[0]) .resize(600, 200) .centerInside() .into(imageViewResizeCenterInside);
The options discussed should take into account your needs for image resizing and scaling functionality. There is one final Picasso helper functionality that can be very useful: fit() .
Picasso .with(context) .load(UsageExampleListViewAdapter.eatFoodyImages[0]) .fit() // call .centerInside() or .centerCrop() to avoid a stretched image .into(imageViewFit);
lallu sukendh
source share