There is my ImageView
<ImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="150dp" />
I load image to this ImageView
using Picasso
library.
Picasso.with(getActivity()).load(url)
.config(Bitmap.Config.RGB_565)
.into(imageView);
There is problem that there is padding inside ImageView
and loaded image.
There is image to show padding:
I use .fit()
method to avoid this gap, but image stretches and quality losts.
(You can see that this dark-blue circles is ovals now)
The question is:
What should I do to avoid loosing quality of image and resize it directly to ImageView
. I can't add .centerCrop()
because left side of image is logical safe-zone. Also I can't change layout_height="150dp"
because it will break all my layout.
Anyway thank you!