Skip to content

Commit

Permalink
[MOB-9101] - EM OOTB Button Text Crop Fix
Browse files Browse the repository at this point in the history
Adjusted button padding.
New Android Version seem to have more padding for buttons. Also there was hardcoded padding added to top and bottom. Hence explicitly adding 0
  • Loading branch information
“Akshay committed Dec 11, 2024
1 parent 64d89bf commit b7e41be
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 21 deletions.
8 changes: 4 additions & 4 deletions iterableapi-ui/src/main/res/layout-v21/banner_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@
android:ellipsize="end"
android:layout_marginStart="16dp"
android:layout_marginEnd="8dp"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:paddingTop="0dp"
android:paddingBottom="0dp"
android:paddingStart="12dp"
android:paddingEnd="12dp"
android:singleLine="true"
Expand All @@ -91,8 +91,8 @@
android:layout_height="36dp"
android:background="@drawable/secondary_banner_button_background"
android:ellipsize="end"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:paddingTop="0dp"
android:paddingBottom="0dp"
android:paddingStart="12dp"
android:paddingEnd="12dp"
android:singleLine="true"
Expand Down
8 changes: 4 additions & 4 deletions iterableapi-ui/src/main/res/layout-v21/card_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@
android:ellipsize="end"
android:layout_marginStart="16dp"
android:layout_marginEnd="8dp"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:paddingTop="0dp"
android:paddingBottom="0dp"
android:paddingStart="12dp"
android:paddingEnd="12dp"
android:singleLine="true"
Expand All @@ -102,8 +102,8 @@
android:layout_height="36dp"
android:background="@drawable/secondary_card_button_background"
android:ellipsize="end"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:paddingTop="0dp"
android:paddingBottom="0dp"
android:paddingStart="12dp"
android:paddingEnd="12dp"
android:singleLine="true"
Expand Down
8 changes: 4 additions & 4 deletions iterableapi-ui/src/main/res/layout-v21/notification_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@
android:textColor="@color/notification_text_color"
android:background="@drawable/primary_notification_button_background"
android:ellipsize="end"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:paddingTop="0dp"
android:paddingBottom="0dp"
android:paddingStart="12dp"
android:paddingEnd="12dp"
android:singleLine="true"
Expand All @@ -84,8 +84,8 @@
android:textColor="@color/notification_text_color"
android:background="@drawable/secondary_notification_button_background"
android:ellipsize="end"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:paddingTop="0dp"
android:paddingBottom="0dp"
android:paddingStart="12dp"
android:paddingEnd="12dp"
android:singleLine="true"
Expand Down
8 changes: 4 additions & 4 deletions iterableapi-ui/src/main/res/layout/banner_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@
android:background="@drawable/primary_banner_button_background"
android:ellipsize="end"
android:layout_marginStart="16dp"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:paddingTop="0dp"
android:paddingBottom="0dp"
android:paddingStart="12dp"
android:paddingEnd="12dp"
android:singleLine="true"
Expand All @@ -90,8 +90,8 @@
android:layout_marginEnd="16dp"
android:background="@drawable/secondary_banner_button_background"
android:ellipsize="end"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:paddingTop="0dp"
android:paddingBottom="0dp"
android:paddingStart="12dp"
android:paddingEnd="12dp"
android:singleLine="true"
Expand Down
6 changes: 5 additions & 1 deletion iterableapi-ui/src/main/res/layout/card_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,16 @@

<Button
android:id="@+id/embedded_message_first_button"
android:layout_width="0dp"
android:layout_width="wrap_content"
android:layout_height="36dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="8dp"
android:background="@drawable/primary_card_button_background"
android:ellipsize="end"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:paddingTop="0dp"
android:paddingBottom="0dp"
android:singleLine="true"
android:stateListAnimator="@null"
android:textAllCaps="false"
Expand All @@ -97,6 +99,8 @@
android:layout_width="0dp"
android:layout_height="36dp"
android:layout_marginEnd="16dp"
android:paddingTop="0dp"
android:paddingBottom="0dp"
android:layout_weight="1"
android:background="@drawable/secondary_card_button_background"
android:ellipsize="end"
Expand Down
8 changes: 4 additions & 4 deletions iterableapi-ui/src/main/res/layout/notification_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@
android:textColor="@color/notification_text_color"
android:background="@drawable/primary_notification_button_background"
android:ellipsize="end"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:paddingTop="0dp"
android:paddingBottom="0dp"
android:paddingStart="12dp"
android:paddingEnd="12dp"
android:singleLine="true"
Expand All @@ -83,8 +83,8 @@
android:textColor="@color/notification_text_color"
android:background="@drawable/secondary_notification_button_background"
android:ellipsize="end"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:paddingTop="0dp"
android:paddingBottom="0dp"
android:paddingStart="12dp"
android:paddingEnd="12dp"
android:singleLine="true"
Expand Down

0 comments on commit b7e41be

Please sign in to comment.