app/src/main/res/layout/display_item_picture.xml
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.card.MaterialCardView
style="?attr/materialCardViewElevatedStyle"
android:id="@+id/cardView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="12dp"
android:clickable="true"
android:focusable="true"
app:shapeAppearance="@style/ShapeAppearance.Material3.MediumComponent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<!-- Media -->
<ImageView
android:id="@+id/displayItemPicture"
android:layout_width="match_parent"
android:layout_height="194dp"
app:srcCompat="@drawable/cardview_clickable_background"
android:scaleType="centerCrop"
android:contentDescription="@string/content_description_media"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp">
<!-- Title, secondary and supporting text -->
<com.google.android.material.textview.MaterialTextView
android:id="@+id/displayItemView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20.5sp"
android:textAppearance="?attr/textAppearanceTitleMedium" />
<!-- Secondary text -->
<com.google.android.material.textview.MaterialTextView
android:id="@+id/displayItemSecondaryView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16.5sp"
android:textAppearance="?attr/textAppearanceSubtitle1" />
</LinearLayout>
<!-- Buttons -->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp">
<com.google.android.material.button.MaterialButton
style="@style/Widget.Material3.Button.Icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/share"
android:textSize="20sp"
android:id="@+id/shareButton"
android:layout_alignParentEnd="true"
app:icon="@android:drawable/ic_menu_share" />
</RelativeLayout>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
</androidx.constraintlayout.widget.ConstraintLayout>