feat(settings): optional "Calendar" launcher name (#44) #86

Merged
makiolaj merged 4 commits from feat/app-name-toggle into release/v2.16.0 2026-07-20 10:45:56 +00:00
Owner

Implements Codeberg issue #44 — an optional setting to change the app's launcher name between "Calendula" and "Calendar", for users on launchers that can't rename apps themselves. Maintainer green-lit it in the issue thread.

How it works

The launcher entry moves off MainActivity onto two <activity-alias> components (DefaultNameAlias / CalendarNameAlias); exactly one is enabled at a time via PackageManager.setComponentEnabledSetting. MainActivity keeps every other intent filter untouched, and the android.app.shortcuts meta-data moves onto both aliases (static shortcuts publish from the MAIN/LAUNCHER owner). Component-enabled state is the single source of truth — no persisted preference.

Settings UI

Settings → Appearance → App name opens a full-screen picker showing both names as launcher-mark preview cards, so the user sees what they'd switch to. Tapping a card applies immediately and highlights it; back exits.

Notable implementation details

  • ComponentName uses the applicationId for the package (carrying the .debug/.releasetest suffix) and the namespace for the class, since manifest .Alias names resolve against the namespace — verified against the merged manifest so it works on the suffixed builds.
  • Switching enables the target alias before disabling the other, so the launcher never sees a zero-entry transient.
  • Pure decision logic (launcherNameFor / aliasWritePlan) split out and JVM-tested; the PackageManager wrapper is covered on-device.
  • Cross-checked against ReFra's real implementation.

Testing

  • lint test assembleDebug green locally; check_translations.py clean.
  • On-device: installed and reviewed on a Pixel.

Launcher-only rename (Settings › Apps / notifications / share sheet still read "Calendula"). Changelog noted in 21600.txt.

Implements Codeberg issue #44 — an optional setting to change the app's **launcher name** between "Calendula" and "Calendar", for users on launchers that can't rename apps themselves. Maintainer green-lit it in the issue thread. ### How it works The launcher entry moves off `MainActivity` onto two `<activity-alias>` components (`DefaultNameAlias` / `CalendarNameAlias`); exactly one is enabled at a time via `PackageManager.setComponentEnabledSetting`. `MainActivity` keeps every other intent filter untouched, and the `android.app.shortcuts` meta-data moves onto both aliases (static shortcuts publish from the MAIN/LAUNCHER owner). Component-enabled state is the single source of truth — no persisted preference. ### Settings UI Settings → Appearance → **App name** opens a full-screen picker showing both names as launcher-mark preview cards, so the user sees what they'd switch to. Tapping a card applies immediately and highlights it; back exits. ### Notable implementation details - `ComponentName` uses the applicationId for the package (carrying the `.debug`/`.releasetest` suffix) and the **namespace** for the class, since manifest `.Alias` names resolve against the namespace — verified against the merged manifest so it works on the suffixed builds. - Switching enables the target alias **before** disabling the other, so the launcher never sees a zero-entry transient. - Pure decision logic (`launcherNameFor` / `aliasWritePlan`) split out and JVM-tested; the `PackageManager` wrapper is covered on-device. - Cross-checked against ReFra's real implementation. ### Testing - `lint test assembleDebug` green locally; `check_translations.py` clean. - On-device: installed and reviewed on a Pixel. Launcher-only rename (Settings › Apps / notifications / share sheet still read "Calendula"). Changelog noted in `21600.txt`.
makiolaj added 4 commits 2026-07-20 10:25:46 +00:00
Add a Settings → Appearance toggle that switches the app's launcher label
between "Calendula" and "Calendar", for users on launchers that can't rename
apps themselves.

The launcher entry moves off MainActivity onto two <activity-alias> components
(DefaultNameAlias / CalendarNameAlias); exactly one is enabled at a time via
PackageManager.setComponentEnabledSetting. MainActivity keeps every other intent
filter; the android.app.shortcuts meta-data moves onto both aliases so the
long-press shortcut still publishes. Component-enabled state is the single source
of truth — no persisted preference.

The ComponentName uses the applicationId for the package (carrying the
.debug/.releasetest suffix) and the namespace for the class, since manifest
".Alias" names resolve against the namespace; switching to Calendar enables the
target alias before disabling the other to avoid a zero-entry launcher transient.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace the inline App name switch with a GroupedRow that opens a full-screen
OptionPicker (Calendula / Calendar), matching the app's other "choose one"
settings and the ReFra pattern the user preferred. The row shows the current
name; the picker's header carries the explanatory + icon-may-move hint. Leaves
room for more launcher names later without redesigning the row.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add a preview hero to the App name picker header: the app's launcher mark over
the current name on a tonal surface card, the explanatory hint below it, then
generous space before the choices. Gives the picker the visual "display" the
inline hint lacked and separates the text from the options.

Follows the material-3 guidance — tonal surfaceContainerHigh card (no shadow),
28dp corner, 8dp-grid spacing, onSurface/onSurfaceVariant role pairing — and
reuses the onboarding BrandHero's squircle reconstruction of the adaptive icon
so it renders identically everywhere.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
feat(settings): App name picker shows both names as preview cards
All checks were successful
Translations / check (pull_request) Successful in 5s
CI / ci (pull_request) Successful in 6m10s
7d357bad87
Replace the single current-state hero + option rows with two selectable
launcher-mark cards (Calendula / Calendar), so the user sees what each choice
would look like, not just the current name. Tapping a card applies immediately
and highlights it (primary border + tinted container + check); the picker stays
open so the change is visible, and back exits — which also fixes the earlier
"hero doesn't update until reopened" gap.

Built on FullScreenPicker directly (the component OptionPicker wraps) to render
the custom card row; material-3 tokens throughout (surfaceContainerHigh /
primary / primaryContainer / outlineVariant, 24dp corners, 8dp-grid spacing).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
makiolaj merged commit c956ac79ed into release/v2.16.0 2026-07-20 10:45:56 +00:00
makiolaj deleted branch feat/app-name-toggle 2026-07-20 10:45:56 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: makiolaj/calendula#86