|
2 | 2 | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
3 | 3 | xmlns:app="http://schemas.android.com/apk/res-auto" |
4 | 4 | android:layout_width="match_parent" |
5 | | - android:layout_height="match_parent" |
| 5 | + android:layout_height="wrap_content" |
6 | 6 | xmlns:tools="http://schemas.android.com/tools" |
7 | 7 | android:layout_gravity="center_vertical" |
8 | 8 | android:layout_marginStart="16dp" |
9 | 9 | android:layout_marginTop="8dp" |
| 10 | + android:layout_marginEnd="16dp" |
10 | 11 | android:layout_marginLeft="16dp" |
| 12 | + android:layout_marginRight="16dp" |
11 | 13 | android:layout_marginBottom="12dp" |
12 | 14 | app:cardCornerRadius="8dp" |
13 | 15 | app:cardElevation="0dp" |
14 | 16 | android:background="@drawable/banner_card_border" |
| 17 | + android:clipToOutline="true" |
| 18 | + android:outlineProvider="background" |
15 | 19 | android:orientation="vertical"> |
16 | 20 |
|
17 | 21 | <com.google.android.material.imageview.ShapeableImageView |
18 | 22 | android:id="@+id/embedded_message_image" |
19 | 23 | android:layout_width="0dp" |
20 | 24 | android:layout_height="0dp" |
21 | 25 | android:contentDescription="" |
22 | | - android:scaleType="centerCrop" |
| 26 | + app:layout_constraintDimensionRatio="H,16:9" |
23 | 27 | app:layout_constraintEnd_toEndOf="parent" |
24 | 28 | app:layout_constraintStart_toStartOf="parent" |
25 | 29 | app:layout_constraintTop_toTopOf="parent" |
26 | | - app:layout_constraintBottom_toTopOf="@id/embedded_message_text_container" |
27 | | - app:shapeAppearanceOverlay="@style/classCardStyle" /> |
| 30 | + /> <!-- 16:9 aspect ratio. Scale type is configured via IterableEmbeddedViewConfig.imageScaleType --> |
28 | 31 |
|
29 | 32 | <LinearLayout |
30 | 33 | android:id="@+id/embedded_message_text_container" |
31 | 34 | android:layout_width="0dp" |
32 | | - android:layout_height="@dimen/card_text_container_height" |
| 35 | + android:layout_height="wrap_content" |
33 | 36 | android:orientation="vertical" |
34 | | - app:layout_constraintBottom_toTopOf="@id/embedded_message_buttons_container" |
| 37 | + app:layout_constraintTop_toBottomOf="@id/embedded_message_image" |
35 | 38 | app:layout_constraintStart_toStartOf="parent" |
36 | 39 | app:layout_constraintEnd_toEndOf="parent"> |
37 | 40 |
|
|
79 | 82 | android:orientation="horizontal" |
80 | 83 | app:layout_constraintEnd_toEndOf="parent" |
81 | 84 | app:layout_constraintStart_toStartOf="parent" |
| 85 | + app:layout_constraintTop_toBottomOf="@id/embedded_message_text_container" |
82 | 86 | app:layout_constraintBottom_toBottomOf="parent"> |
83 | 87 |
|
84 | 88 | <com.google.android.material.button.MaterialButton |
|
0 commit comments