I have a RecyclerView
using it as a grid. In each view, I am loading an image from a URL. I tried with Picasso, Fresco and Glide. I have only one issue with all these libraries that is, the images are stretched. This is because of the sizes of the images are different. I am providing the sample of my SimpleDraweeView
.
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/sdvRestaurant"
android:layout_width="match_parent"
android:layout_height="@dimen/_120sdp"
app:actualImageResource="@drawable/bg_city"
app:actualImageScaleType="fitXY"
android:adjustViewBounds="true"
android:background="@color/card_shadow_2"/>
My question is, what is the proper way to avoid this image stretching issue? I am thinking that it is not possible to change the size of the image. Scale type that I tried is fitXY
which did not help. Also, centerCrop
attribute crops my original image. Please give some hint to solve this. Thanks in advance.