diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-08-06 16:57:44 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-08-06 16:57:44 +0000 |
| commit | a1ca48e0dc760393a59fe745736b6b0668fade17 (patch) | |
| tree | 5313abafd45e05218dc2c098919349138dc4f529 /android/app/src/main/AndroidManifest.xml | |
| parent | b56da63fe7776b14bc2cff4fe3c63ae2dd65ac73 (diff) | |
Widget: give Dashboard its own launcher icon, add toolbar nav
DashboardActivity is now the app's single home-screen launcher entry
(MAIN/LAUNCHER intent-filter), replacing SettingsActivity in that role.
SettingsActivity keeps only APPWIDGET_CONFIGURE (still exported=true,
since the launcher/home-screen process starts it directly during widget
placement) and is now reached via a gear button in Dashboard's toolbar.
DashboardActivity itself is rewritten from a bare setContentView(webView)
to Compose Scaffold/TopAppBar wrapping the WebView via AndroidView, adding:
- a back arrow (shown only when the WebView has history) instead of relying
solely on the hardware back key
- a settings gear action launching SettingsActivity
- the page title tracked from the loaded page
Also fixes a race in the original version: server URL was loaded via a
lifecycleScope coroutine racing the WebView's own initialization order.
Now it's plain Compose state (LaunchedEffect + AndroidView's update
callback), so the WebView never loads before the URL is known.
No native tab bar: web/templates/index.html's tabs are HTMX partials
(hx-get targeting #tab-content), not separate pages, so loading "/" in
the WebView already gets full in-app navigation for free.
Verified on emulator-5556 (doot_test_api36): pm resolve-activity confirms
DashboardActivity is the launcher default; launched it, confirmed no
crash and topResumedActivity is Dashboard; configured a dummy server URL
via Settings and confirmed the toolbar renders (title, gear icon) and
the gear button correctly navigates to SettingsActivity (topResumedActivity
becomes SettingsActivity) with no crash.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EZ7ikw2ukGJFTHE3bJS7zL
Diffstat (limited to 'android/app/src/main/AndroidManifest.xml')
| -rw-r--r-- | android/app/src/main/AndroidManifest.xml | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 148d841..db97b1b 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -33,20 +33,25 @@ android:exported="false" android:windowSoftInputMode="adjustResize|stateVisible" /> - <!-- Full dashboard, wrapped in a WebView (see DashboardActivity's doc comment) --> + <!-- Full dashboard, wrapped in a WebView (see DashboardActivity's doc comment). + Now the app's single launcher entry point; Settings is reached from its + toolbar gear button instead of its own home-screen icon. --> <activity android:name=".ui.DashboardActivity" - android:exported="false" - android:label="Doot" /> - - <!-- Settings activity (also the widget config screen) --> - <activity - android:name=".ui.SettingsActivity" - android:exported="true"> + android:exported="true" + android:label="Doot"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> + </activity> + + <!-- Settings activity (also the widget config screen, which is why it must + stay exported=true: the launcher/home-screen process starts it directly + during widget placement, regardless of the app's own launcher entry). --> + <activity + android:name=".ui.SettingsActivity" + android:exported="true"> <intent-filter> <action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" /> </intent-filter> |
