Skip to content

Commit e91ab45

Browse files
committed
Enable transparent IAM backgrounds
We need to set our webview and cardview's background colors to transparent for this. We can safely always do this because the HTML for the IAM will already set a background color.
1 parent b41c278 commit e91ab45

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

OneSignalSDK/onesignal/src/main/java/com/onesignal/InAppMessageView.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ interface InAppMessageViewListener {
9292

9393
void setWebView(WebView webView) {
9494
this.webView = webView;
95+
this.webView.setBackgroundColor(Color.TRANSPARENT);
9596
}
9697

9798
void setMessageController(InAppMessageViewListener messageController) {
@@ -372,6 +373,7 @@ private CardView createCardView(Context context) {
372373
cardView.setClipChildren(false);
373374
cardView.setClipToPadding(false);
374375
cardView.setPreventCornerOverlap(false);
376+
cardView.setBackgroundColor(Color.TRANSPARENT);
375377

376378
return cardView;
377379
}

0 commit comments

Comments
 (0)