Skip to content

Commit 44f314a

Browse files
Not making content go behind status bar on fullscreen in-app
1 parent 12e0056 commit 44f314a

2 files changed

Lines changed: 5 additions & 8 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5+
## [Unreleased]
6+
### Fixed
7+
- Fixed close button position on full screen in-app messages being obscured by the system status bar.
8+
59
## [3.6.5]
610
### Fixed
711
- Fixed IterableEmbeddedView not having an empty constructor and causing crashes

iterableapi/src/main/java/com/iterable/iterableapi/IterableInAppFragmentHTMLNotification.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,7 @@ public void onCancel(DialogInterface dialog) {
176176
applyWindowGravity(dialog.getWindow(), "onCreateDialog");
177177
}
178178

179-
if (getInAppLayout(insetPadding) == InAppLayout.FULLSCREEN) {
180-
dialog.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
181-
} else if (getInAppLayout(insetPadding) != InAppLayout.TOP) {
179+
if (getInAppLayout(insetPadding) != InAppLayout.FULLSCREEN && getInAppLayout(insetPadding) != InAppLayout.TOP) {
182180
// For TOP layout in-app, status bar will be opaque so that the in-app content does not overlap with translucent status bar.
183181
// For other non-fullscreen in-apps layouts (BOTTOM and CENTER), status bar will be translucent
184182
dialog.getWindow().setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
@@ -191,10 +189,6 @@ public void onCancel(DialogInterface dialog) {
191189
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
192190
getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
193191

194-
if (getInAppLayout(insetPadding) == InAppLayout.FULLSCREEN) {
195-
getDialog().getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
196-
}
197-
198192
// Set initial window gravity based on inset padding (only for non-fullscreen)
199193
if (getInAppLayout(insetPadding) != InAppLayout.FULLSCREEN) {
200194
applyWindowGravity(getDialog().getWindow(), "onCreateView");
@@ -623,7 +617,6 @@ public void run() {
623617
if (insetPadding.bottom == 0 && insetPadding.top == 0) {
624618
//Handle full screen
625619
window.setLayout(webViewWidth, webViewHeight);
626-
getDialog().getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
627620
} else {
628621
// Resize the WebView directly with explicit size
629622
float relativeHeight = height * getResources().getDisplayMetrics().density;

0 commit comments

Comments
 (0)