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): stop cards flashing a leftover frame when they close

booboosui7d70a83d5972
diff --git a/app/src/main/java/net/kuafuai/andee/ui/Glass.kt b/app/src/main/java/net/kuafuai/andee/ui/Glass.kt
index 3ad5267..ff9260a 100644
--- a/app/src/main/java/net/kuafuai/andee/ui/Glass.kt
+++ b/app/src/main/java/net/kuafuai/andee/ui/Glass.kt
@@ -387,15 +387,22 @@ object Glass {
done()
}
}
+ // Hide for real and let a blank frame commit before the window goes, so no card frame is left behind.
+ val blankThenDone = Runnable {
+ v.visibility = View.INVISIBLE
+ ui.postDelayed(once, BLANK_FRAME_MS)
+ }
v.animate()
.alpha(0f).scaleX(0.96f).scaleY(0.96f).translationY(dp(v.context, 8).toFloat())
.setDuration(170)
.setInterpolator(EASE_IN)
- .withEndAction(once)
+ .withEndAction(blankThenDone)
.start()
ui.postDelayed(once, 400)
}
+ private const val BLANK_FRAME_MS = 34L
+
/** Cross-fade one root view for another — see `SettingsUi.rebuild`. */
fun fadeOut(v: View, then: () -> Unit) {
v.animate().alpha(0f).scaleX(0.985f).scaleY(0.985f)