Skip to content

Commit 7dc0f89

Browse files
committed
[[ Bug 19670 ]] Fix effective working screenrect on Android
This patch fixes the effective working screenrect on Android when the status bar is hidden. Previously to determine the area not covered by screen decorations we used `getGlobalVisibleRect`, however this only took clipping into account and in some cases decorations do not clip the view. This patch uses `getWindowVisibleDisplayFrame` which is documented to tell `you the available area where content can be placed and remain visible to users.`
1 parent 557417d commit 7dc0f89

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

docs/notes/bugfix-19670.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Fix effective working screenrect on Android when status bar is hidden

engine/src/java/com/runrev/android/Engine.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1218,8 +1218,8 @@ public String getViewportAsString()
12181218
private Rect getEffectiveWorkarea()
12191219
{
12201220
Rect t_workrect = new Rect();
1221-
getGlobalVisibleRect(t_workrect);
1222-
return t_workrect;
1221+
getWindowVisibleDisplayFrame(t_workrect);
1222+
return t_workrect;
12231223
}
12241224

12251225
public String getEffectiveWorkareaAsString()

0 commit comments

Comments
 (0)