Skip to content

armgit / andee

Public Imported from GitHub
0

Andee lives on your phone or Mac and uses any app like you do—no integrations, no root, any model; memory and passwords never leave your device | Andee 住进你的手机或 Mac,像你一样操作任何 App——无需集成、无需 Root、支持任意模型,记忆和密码绝不离开设备。

fix(ui): let the unfolded card run under the system bars

booboosui42554947b49f
diff --git a/app/src/main/java/net/kuafuai/andee/ui/FloatingWindowUi.kt b/app/src/main/java/net/kuafuai/andee/ui/FloatingWindowUi.kt
index 47c8d8c..e6b1fc1 100644
--- a/app/src/main/java/net/kuafuai/andee/ui/FloatingWindowUi.kt
+++ b/app/src/main/java/net/kuafuai/andee/ui/FloatingWindowUi.kt
@@ -362,6 +362,13 @@ class FloatingWindowUi(
gravity = Gravity.TOP or Gravity.START
x = dm.widthPixels - side - dp(COMPACT_MARGIN_DP)
y = dm.heightPixels - side - dp(COMPACT_MARGIN_DP)
+ // FLAG_LAYOUT_IN_SCREEN alone is not enough: since API 30 the window
+ // also fits the system-bar insets by default, so on the Honor phone a
+ // MATCH_PARENT card still started below the status bar and stopped
+ // above the navigation bar. Zero lets the card cover the display.
+ fitInsetsTypes = 0
+ layoutInDisplayCutoutMode =
+ WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS
}
// Where the ball climbs back to when a task ends. [enterCompact] is the
// other place this is set, and it is the one that usually runs — but