Skip to content

Commit 32c190f

Browse files
committed
Fix padding on BGR IMG notifications for RTL
Correct the title and body 4dp padding from "left" to "start" to support both RTL and LTR languages. This panding is important so there is a bit of room between the large icon or the edge of the screen depending on if the text is LTR or RTL, in that order . Changed `layout_marginStart` to `left` since the SDK does not support a different image based on if the device is RTL or LTR. Along with this change the documenation should instruct developers to always put their app icon on the left side.
1 parent a023c9e commit 32c190f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

OneSignalSDK/onesignal/src/main/res/layout/onesignal_bgimage_notif_layout.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
<LinearLayout
3333
android:orientation="vertical"
34-
android:layout_marginStart="@android:dimen/notification_large_icon_width"
34+
android:layout_marginLeft="@android:dimen/notification_large_icon_width"
3535
android:layout_width="fill_parent"
3636
android:layout_height="64dp"
3737
android:textDirection="locale"
@@ -43,7 +43,7 @@
4343
android:textAppearance="@android:style/TextAppearance.StatusBar.EventContent.Title"
4444
android:text="Medium Text"
4545
android:paddingTop="8dp"
46-
android:paddingLeft="4dp"
46+
android:paddingStart="4dp"
4747
android:singleLine="true"
4848
android:ellipsize="marquee"/>
4949
<TextView
@@ -56,6 +56,6 @@
5656
android:singleLine="true"
5757
android:ellipsize="marquee"
5858
android:fadingEdge="horizontal"
59-
android:paddingLeft="4dp"/>
59+
android:paddingStart="4dp"/>
6060
</LinearLayout>
6161
</RelativeLayout>

0 commit comments

Comments
 (0)