Notification background image RTL fixes for 3.x.x#1475
Merged
Conversation
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.
Render OneSignal's custom background image notfications in RTL (right-to-left) for those devices that have set a language that renders in this direction. This does not account for some spacing issues however the next commit will cover this.
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.
nan-li
approved these changes
Oct 28, 2021
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
One Line Summary
This is a back port to 3.x.x for the following two fixes which have been pulled into this branch with
git cherry-pick.This change is