Fit image
This commit is contained in:
@@ -9,6 +9,7 @@ class ImageLoaderGlide @Inject constructor() : ImageLoader {
|
|||||||
override fun loadImage(url: String?, @DrawableRes placeholderId: Int, imageView: ImageView) {
|
override fun loadImage(url: String?, @DrawableRes placeholderId: Int, imageView: ImageView) {
|
||||||
GlideApp.with(imageView)
|
GlideApp.with(imageView)
|
||||||
.load(url)
|
.load(url)
|
||||||
|
.centerCrop()
|
||||||
.placeholder(placeholderId)
|
.placeholder(placeholderId)
|
||||||
.into(imageView)
|
.into(imageView)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
android:id="@+id/image"
|
android:id="@+id/image"
|
||||||
android:layout_width="@dimen/width_view_holder_recipe_image"
|
android:layout_width="@dimen/width_view_holder_recipe_image"
|
||||||
android:layout_height="@dimen/height_view_holder_recipe_image"
|
android:layout_height="@dimen/height_view_holder_recipe_image"
|
||||||
android:layout_margin="@dimen/margin_small"
|
|
||||||
android:contentDescription="@string/content_description_view_holder_recipe_image"
|
android:contentDescription="@string/content_description_view_holder_recipe_image"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
|||||||
Reference in New Issue
Block a user