Add round corners to recipe images
This commit is contained in:
@@ -34,13 +34,15 @@
|
|||||||
<com.google.android.material.imageview.ShapeableImageView
|
<com.google.android.material.imageview.ShapeableImageView
|
||||||
android:id="@+id/image"
|
android:id="@+id/image"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="@dimen/fragment_recipe_info_image_height"
|
android:layout_height="0dp"
|
||||||
android:contentDescription="@string/content_description_fragment_recipe_info_image"
|
android:contentDescription="@string/content_description_fragment_recipe_info_image"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/title"
|
app:layout_constraintBottom_toTopOf="@+id/title"
|
||||||
|
app:layout_constraintDimensionRatio="2:1"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:shapeAppearance="?shapeAppearanceCornerMedium"
|
||||||
tools:srcCompat="@drawable/placeholder_recipe" />
|
tools:srcCompat="@drawable/placeholder_recipe" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
|||||||
@@ -30,18 +30,20 @@
|
|||||||
|
|
||||||
<com.google.android.material.imageview.ShapeableImageView
|
<com.google.android.material.imageview.ShapeableImageView
|
||||||
android:id="@+id/image"
|
android:id="@+id/image"
|
||||||
android:layout_width="300dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="@dimen/height_view_holder_recipe_image"
|
android:layout_height="0dp"
|
||||||
android:layout_marginStart="15dp"
|
android:layout_marginStart="15dp"
|
||||||
android:layout_marginTop="20dp"
|
android:layout_marginTop="20dp"
|
||||||
android:layout_marginEnd="13dp"
|
android:layout_marginEnd="13dp"
|
||||||
android:contentDescription="@string/content_description_view_holder_recipe_image"
|
android:contentDescription="@string/content_description_view_holder_recipe_image"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/name"
|
app:layout_constraintBottom_toTopOf="@+id/name"
|
||||||
|
app:layout_constraintDimensionRatio="2:1"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintVertical_chainStyle="packed"
|
app:layout_constraintVertical_chainStyle="packed"
|
||||||
|
app:shapeAppearance="?shapeAppearanceCornerMedium"
|
||||||
tools:srcCompat="@drawable/placeholder_recipe" />
|
tools:srcCompat="@drawable/placeholder_recipe" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</com.google.android.material.card.MaterialCardView>
|
</com.google.android.material.card.MaterialCardView>
|
||||||
@@ -1,6 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<dimen name="margin_small">8dp</dimen>
|
<dimen name="margin_small">8dp</dimen>
|
||||||
<dimen name="height_view_holder_recipe_image">182dp</dimen>
|
|
||||||
<dimen name="fragment_recipe_info_image_height">@dimen/height_view_holder_recipe_image</dimen>
|
|
||||||
</resources>
|
</resources>
|
||||||
Reference in New Issue
Block a user