Skip to content

Commit a97c7cc

Browse files
authored
Merge pull request #1474 from OneSignal/fix/notification_background_image_rtl_text
Fix notification background image layouts to render text RTL based on the device's language setting
2 parents fe84b98 + 1463ced commit a97c7cc

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

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

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,20 @@
3030
</RelativeLayout>
3131

3232
<LinearLayout
33-
xmlns:tools="http://schemas.android.com/tools"
34-
tools:ignore="RtlCompat"
35-
3633
android:orientation="vertical"
37-
android:layout_marginStart="@android:dimen/notification_large_icon_width"
34+
android:layout_marginLeft="@android:dimen/notification_large_icon_width"
3835
android:layout_width="fill_parent"
39-
android:layout_height="64dp">
36+
android:layout_height="64dp"
37+
android:textDirection="locale"
38+
>
4039
<TextView
4140
android:id="@+id/os_bgimage_notif_title"
4241
android:layout_width="match_parent"
4342
android:layout_height="wrap_content"
4443
android:textAppearance="@android:style/TextAppearance.StatusBar.EventContent.Title"
4544
android:text="Medium Text"
4645
android:paddingTop="8dp"
47-
android:paddingLeft="4dp"
46+
android:paddingStart="4dp"
4847
android:singleLine="true"
4948
android:ellipsize="marquee"/>
5049
<TextView
@@ -57,6 +56,6 @@
5756
android:singleLine="true"
5857
android:ellipsize="marquee"
5958
android:fadingEdge="horizontal"
60-
android:paddingLeft="4dp"/>
59+
android:paddingStart="4dp"/>
6160
</LinearLayout>
6261
</RelativeLayout>

0 commit comments

Comments
 (0)