Repository navigation
fix: Android findings from ShellLedger (Application name, input focus, system bars, wrapped transforms) - #38
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Five bugs found building ShellLedger (MAUI on Android):
Applicationin full. In an app with an<App>.Applicationproject, a bareApplicationresolved to that namespace (CS0234). A new test keeps it out of all templates.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.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(plustoaston Avalonia).🤖 Generated with Claude Code