Skip to content

Commit fbb694d

Browse files
committed
处理因为修复触摸移动出现跳动的问题从而引发的悬浮窗无法移动到状态栏的问题
1 parent 68b4747 commit fbb694d

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

library/src/main/java/com/hjq/window/EasyWindow.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -446,10 +446,9 @@ public EasyWindow(@NonNull Activity activity) {
446446
setSystemUiVisibility(params.systemUiVisibility);
447447
}
448448

449-
// 相关问题地址:https://github.com/getActivity/EasyWindow/issues/85
450-
//if (decorView.getSystemUiVisibility() != 0) {
451-
// mWindowRootLayout.setSystemUiVisibility(decorView.getSystemUiVisibility());
452-
//}
449+
if (decorView.getSystemUiVisibility() != 0) {
450+
mWindowRootLayout.setSystemUiVisibility(decorView.getSystemUiVisibility());
451+
}
453452

454453
// 跟随 Activity 的生命周期
455454
mWindowLifecycleControl = new WindowLifecycleControl(this, activity);

library/src/main/java/com/hjq/window/draggable/AbstractWindowDraggableRule.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -281,16 +281,13 @@ public void refreshWindowInfo() {
281281
return;
282282
}
283283

284-
View decorView = null;
284+
// 相关问题地址:https://github.com/getActivity/EasyWindow/issues/85
285+
View decorView = getWindowRootLayout();
285286

286-
if (context instanceof Activity) {
287+
if (decorView == null && context instanceof Activity) {
287288
decorView = ((Activity) context).getWindow().getDecorView();
288289
}
289290

290-
if (decorView == null) {
291-
decorView = getWindowRootLayout();
292-
}
293-
294291
if (decorView == null) {
295292
return;
296293
}

0 commit comments

Comments
 (0)