Skip to content

Commit efc7e36

Browse files
sumchatteringclaude
andcommitted
[SDK-997] Fix IterableEmbeddedView to match campaign preview
Fix card view image height to use wrap_content with adjustViewBounds for proper image sizing. Change scaleType to fitCenter. Fix notification_view_border.xml swapped stroke/solid colors. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent c42e6bc commit efc7e36

3 files changed

Lines changed: 16 additions & 10 deletions

File tree

iterableapi-ui/src/main/res/drawable/notification_view_border.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
<stroke
66
android:width="1dp"
7-
android:color="@color/notification_background_color" />
7+
android:color="@color/notification_border_color" />
88

9-
<solid android:color="@color/notification_border_color" />
9+
<solid android:color="@color/notification_background_color" />
1010

1111
<corners
1212
android:radius="8dp" />

iterableapi-ui/src/main/res/layout-v21/card_view.xml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
xmlns:android="http://schemas.android.com/apk/res/android"
44
xmlns:app="http://schemas.android.com/apk/res-auto"
55
android:layout_width="match_parent"
6-
android:layout_height="match_parent"
6+
android:layout_height="wrap_content"
77
android:layout_gravity="center_vertical"
88
android:layout_marginTop="8dp"
99
android:layout_marginLeft="16dp"
@@ -16,19 +16,22 @@
1616
<com.google.android.material.imageview.ShapeableImageView
1717
android:id="@+id/embedded_message_image"
1818
android:layout_width="0dp"
19-
android:layout_height="0dp"
19+
android:layout_height="wrap_content"
20+
android:adjustViewBounds="true"
2021
android:contentDescription=""
21-
android:scaleType="centerCrop"
22+
android:scaleType="fitCenter"
2223
app:layout_constraintEnd_toEndOf="parent"
2324
app:layout_constraintStart_toStartOf="parent"
2425
app:layout_constraintTop_toTopOf="parent"
2526
app:layout_constraintBottom_toTopOf="@id/embedded_message_text_container"
27+
app:layout_constraintVertical_chainStyle="packed"
28+
app:layout_constraintVertical_bias="0"
2629
app:shapeAppearanceOverlay="@style/classCardStyle" />
2730

2831
<LinearLayout
2932
android:id="@+id/embedded_message_text_container"
3033
android:layout_width="0dp"
31-
android:layout_height="@dimen/card_text_container_height"
34+
android:layout_height="wrap_content"
3235
android:orientation="vertical"
3336
app:layout_constraintBottom_toTopOf="@id/embedded_message_buttons_container"
3437
app:layout_constraintStart_toStartOf="parent"

iterableapi-ui/src/main/res/layout/card_view.xml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:app="http://schemas.android.com/apk/res-auto"
44
android:layout_width="match_parent"
5-
android:layout_height="match_parent"
5+
android:layout_height="wrap_content"
66
xmlns:tools="http://schemas.android.com/tools"
77
android:layout_gravity="center_vertical"
88
android:layout_marginStart="16dp"
@@ -17,19 +17,22 @@
1717
<com.google.android.material.imageview.ShapeableImageView
1818
android:id="@+id/embedded_message_image"
1919
android:layout_width="0dp"
20-
android:layout_height="0dp"
20+
android:layout_height="wrap_content"
21+
android:adjustViewBounds="true"
2122
android:contentDescription=""
22-
android:scaleType="centerCrop"
23+
android:scaleType="fitCenter"
2324
app:layout_constraintEnd_toEndOf="parent"
2425
app:layout_constraintStart_toStartOf="parent"
2526
app:layout_constraintTop_toTopOf="parent"
2627
app:layout_constraintBottom_toTopOf="@id/embedded_message_text_container"
28+
app:layout_constraintVertical_chainStyle="packed"
29+
app:layout_constraintVertical_bias="0"
2730
app:shapeAppearanceOverlay="@style/classCardStyle" />
2831

2932
<LinearLayout
3033
android:id="@+id/embedded_message_text_container"
3134
android:layout_width="0dp"
32-
android:layout_height="@dimen/card_text_container_height"
35+
android:layout_height="wrap_content"
3336
android:orientation="vertical"
3437
app:layout_constraintBottom_toTopOf="@id/embedded_message_buttons_container"
3538
app:layout_constraintStart_toStartOf="parent"

0 commit comments

Comments
 (0)