From aeeea5ead395f80a27e3a5b3e3fa06d88febea86 Mon Sep 17 00:00:00 2001 From: James Babcock Date: Sat, 26 Sep 2026 22:44:39 -0700 Subject: [PATCH] Animations in EvenHub menus; closer style matching --- .../app/FaceclawEvenHubWebViewHost.kt | 40 ++++- app/apps/evenhub/compositor.ts | 45 +----- app/apps/evenhub/containers.ts | 13 +- app/apps/evenhub/list-menu.ts | 126 +++++++++++++++ app/apps/evenhub/session.ts | 10 +- app/apps/evenhub/webview.ts | 7 +- tests/evenhub-containers.test.cjs | 14 ++ tests/evenhub-list-menu.test.cjs | 148 ++++++++++++++++++ tests/tsconfig.json | 1 + 9 files changed, 349 insertions(+), 55 deletions(-) create mode 100644 app/apps/evenhub/list-menu.ts create mode 100644 tests/evenhub-list-menu.test.cjs diff --git a/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawEvenHubWebViewHost.kt b/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawEvenHubWebViewHost.kt index 7e563d0e..bee8e1da 100644 --- a/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawEvenHubWebViewHost.kt +++ b/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawEvenHubWebViewHost.kt @@ -1,6 +1,7 @@ package com.faceclaw.app import android.app.Activity +import android.content.MutableContextWrapper import android.os.Build import android.os.Handler import android.os.Looper @@ -54,9 +55,20 @@ import java.util.ArrayList * timers/onResume asserted on attach. The main Looper keeps ticking under the * foreground service, so apps keep driving their glasses windows in the * background. + * + * Activity recreation: this host outlives any one activity (it is a process + * singleton, and apps keep running while the activity is destroyed and + * recreated, e.g. after an app update or a config change). The overlay lives in + * one activity's content view, so attach and showOnPhone first move it, with + * every WebView in it, into the activity they are given if it isn't already + * there; otherwise "show" would raise it in a dead window. WebViews are created + * on a MutableContextWrapper whose base is re-pointed at the same time, so the + * dialogs Chromium opens from the page (e.g. a