Skip to content

Commit 89272de

Browse files
committed
Fix notification background image for RTL devices
The notification background image would not show if the app has `android:supportsRtl="true"` the `AndroidManifest.xml` AND the device has a RTL language set. This would result in the notification becoming a sold color (all known instances have been a white background) and only the title and body text showing. Setting `android:layoutDirection="ltr"` ensures the layout, only used for images, isn't influenced by the language direction. This does NOT affect most notifications, only those that use `android_background_layout` in their notification payload. This change does NOT affect the rending of the title or body text in any way.
1 parent 6fdfb55 commit 89272de

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<!--android:textAppearance="@android:style/TextAppearance.StatusBar.EventContent.Title"-->
88

99
<RelativeLayout android:id="@+id/os_bgimage_notif_bgimage_align_layout"
10+
android:layoutDirection="ltr"
1011
android:layout_width="wrap_content"
1112
android:layout_height="64dp"
1213
android:paddingLeft="0dp"

0 commit comments

Comments
 (0)