Skip to content

Commit 5b5d8c6

Browse files
committed
Fix status bar artifact on opens and closes
On API 30 to 34, the status bar changes color when the keyboard appears and disappears. A ghost of the changed status bar is animated by the same animation used for the keyboard, which is unexpected.
1 parent 926b99c commit 5b5d8c6

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

srcs/juloo.keyboard2/Keyboard2.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,9 @@ public void updateFullscreenMode() {
292292

293293
private void updateSoftInputWindowLayoutParams() {
294294
final Window window = getWindow().getWindow();
295-
// On API >= 30, Keyboard2View behaves as edge-to-edge
296-
if (VERSION.SDK_INT >= 30)
295+
// On API >= 35, Keyboard2View behaves as edge-to-edge
296+
// APIs 30 to 34 have visual artifact when edge-to-edge is enabled
297+
if (VERSION.SDK_INT >= 35)
297298
{
298299
WindowManager.LayoutParams wattrs = window.getAttributes();
299300
wattrs.layoutInDisplayCutoutMode =

srcs/juloo.keyboard2/Keyboard2View.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ public void onMeasure(int wSpec, int hSpec)
264264
int insets_bottom = 0;
265265
// LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS is set in [Keyboard2#updateSoftInputWindowLayoutParams].
266266
// and keyboard is allowed do draw behind status/navigation bars
267-
if (VERSION.SDK_INT >= 30)
267+
if (VERSION.SDK_INT >= 35)
268268
{
269269
WindowMetrics metrics =
270270
((WindowManager)getContext().getSystemService(Context.WINDOW_SERVICE))

0 commit comments

Comments
 (0)