Add AndroidManifest option to override In-App Messages gray overlay and dropshadow#2051
Merged
Add AndroidManifest option to override In-App Messages gray overlay and dropshadow#2051
Conversation
nan-li
requested changes
Apr 12, 2024
| } | ||
|
|
||
| var overlayColor = Color.parseColor("#BB000000") | ||
|
|
Contributor
There was a problem hiding this comment.
Since this block of code repeats twice, we can make it into a method and call that method when we need to get the color.
Color.parseColor("#00000000") below is also the transparent color. We can consolidate into one variable and prefer Color.TRANSPARENT for clarity.
- separate out overlay color getter into its own method to reduce redundancy - update wording for dropsahdow getter for succinctness - add back constants to companion object
nan-li
approved these changes
Apr 12, 2024
jkasten2
approved these changes
Apr 15, 2024
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
Add AndroidManifest option to override In-App Messages gray overlay and dropshadow.
Details
Customers would like the ability to control some In-App Message display "defaults":
Customers would like the option to disable this overlay.
With this PR, developers can now add
com.onesignal.inAppMessageHideGrayOverlayandcom.onesignal.inAppMessageHideDropShadowto AndroidManifest.xml. Setting these values to true will not show a shadow or gray overlay. Omitting these values or setting them to false will display the default In-App design with drop shadow and gray overlay.Examples without the dropshadow

Example with the dropshadow

Example with the gray overlay

Example without the gray overlay

Scope
New and existing In-App Message visual behavior.
Other
In the future, we can further consider the use case of having a drop shadow and transparent background:

Currently, the drop shadow is for the entire IAM, including the transparent parts. The question would be whether this is expected, or a shadow around each visible element only.
Future work could include aligning Android and iOS appearance based on whatever is deemed "expected".
Testing
Manual testing
Tested on all IAM types with a Pixel 7 Pro emulator running Android 14 without AndroidManifest meta-data, with meta-data set to
true, and with meta-data set tofalse.Affected code checklist
Checklist
Overview
Testing
Final pass
This change is