Skip to content

fix: Android findings from ShellLedger (Application name, input focus, system bars, wrapped transforms) - #38

Merged
Shewart merged 4 commits into
mainfrom
fix/android-app-findings
Oct 18, 2026
Merged

Shewart merged 4 commits into
mainfrom
fix/android-app-findings

Conversation

@Shewart

@Shewart Shewart commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Five bugs found building ShellLedger (MAUI on Android):

  • shell (MAUI and Avalonia), Avalonia toast: name Application in full. In an app with an <App>.Application project, a bare Application resolved to that namespace (CS0234). A new test keeps it out of all templates.
  • input, textarea, input-group (MAUI): the focus/error glow is always set and only its opacity changes. Adding or removing a Shadow on Android re-wraps the Border's native view, which took focus from the field and closed the keyboard.
  • shell (MAUI): with SyncSystemBars, the bars are applied again when a page appears. The new activity Android creates when the app is reopened after Back now gets themed, edge-to-edge bars without an app workaround.
  • shell (MAUI): new ShellPlatform.KeepTransformsOnWrapper. Android wraps an InputTransparent (or shadowed/clipped) view after its handler has put translation/scale/rotation on the inner view; later changes moved only the wrapper. Icon uses it (theme-toggle's moon stayed half size and turned), and so does bottom-nav (the indicator sat 25 dp off after the activity was re-created).

Avalonia isn't affected by the last three, because BoxShadow and RenderTransform are drawn, not wrapped.

Verified: solution 0 warnings, 1685 + 174 tests, format clean; each commit builds and tests on its own. Pixel 7 API 34 emulator: typing in Input, Textarea and InputGroup; bars after Back + reopen (black without the fix); bottom-nav indicator after re-creation, push/pop and resume; theme toggle both ways.

Upgrade: shellui-native update shell icon bottom-nav input textarea input-group (plus toast on Avalonia).

🤖 Generated with Claude Code

In an app with an <App>.Application project (clean architecture), a bare
`Application` inside <App>.App.Components.UI resolves to that namespace and
the app fails to build with CS0234. The MAUI shell and the Avalonia shell and
toast now write Microsoft.Maui.Controls.Application / Avalonia.Application.
A template test keeps bare `Application` out of every template.
The focus glow was added on focus and cleared on blur. Adding or removing a
Shadow on Android makes MAUI re-wrap the Border's native view (removeView +
add), which detaches the focused EditText: focus jumps to the first focusable
view, the keyboard closes and typing goes nowhere. The shadow is now always
set and only its opacity changes (0 idle, 0.35 focused or in error).
With ShellTheme.SyncSystemBars, backing out of the app at the root and
reopening it creates a new activity whose bars were never themed (black, page
no longer edge to edge), so apps needed `window.Created += ShellTheme.Apply()`.
The shell now applies the bars again whenever a page appears.
Android wraps an InputTransparent (or shadowed / clipped) view in a
WrapperView after its handler has applied the view's translation, scale and
rotation to the view itself. Later changes move only the wrapper, so the inner
view keeps the first values for good:

- theme-toggle: the moon stayed at half size and turned after switching to
  dark (its hidden state when the handler was created);
- bottom-nav: the Default indicator sat about 25 dp right of the active item
  after the handler was re-created with the page kept (a new activity), and
  stayed offset on every later switch.

ShellPlatform.KeepTransformsOnWrapper (Android only) resets the inner view
when the handler connects and re-applies the transforms to the wrapper. Icon
uses it, which also covers chevrons and spinners, and so do bottom-nav's
indicator, glyph, circle and icon host.
@github-actions github-actions Bot added documentation Improvements or additions to documentation templates examples labels Oct 18, 2026
@Shewart
Shewart merged commit 8bd5cf7 into main Oct 18, 2026
7 checks passed
@Shewart
Shewart deleted the fix/android-app-findings branch October 18, 2026 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation examples templates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant