Skip to content

K2GO-439 fix(ui): handle edge-to-edge insets on targetSdk 35 - #613

Merged
luisguzman-adfa merged 4 commits into
mainfrom
fix/K2GO-439-edge-to-edge
Oct 2, 2026
Merged

luisguzman-adfa merged 4 commits into
mainfrom
fix/K2GO-439-edge-to-edge

Conversation

@luisguzman-adfa

Copy link
Copy Markdown
Collaborator

At targetSdk 35 Android 15+ forces edge-to-edge, so app content and WebViews drew under the
status and navigation bars.

Changes:

  • Add EdgeToEdge (system-bar + IME inset padding; a pure resolvePadding, unit-tested) and an
    app-wide ActivityLifecycleCallbacks owner that insets each activity's content, with a
    SelfManaged opt-out.
  • LibraryActivity pads its content top for the status bar and lets the Material bottom nav / rail
    inset themselves for the navigation bar; the install overlay is inset too.
  • SplashActivity (full-screen) and HelpViewerActivity (fitsSystemWindows) opt out; PortalActivity
    (WebView) stays in so the global handler insets it, including when its immersive mode hides
    the bars.
  • Drop windowSoftInputMode=adjustResize from TerminalActivity so the IME inset is handled once.

Verified on-device (OnePlus 7T / Android 15, Samsung A16 / Android 16): native screens and the
content WebView keep clear of both system bars.

Android 15+ forces edge-to-edge, so app content and WebViews drew under the status
and navigation bars. Add an EdgeToEdge helper and an app-wide ActivityLifecycleCallbacks
owner that pads each activity's content by the system-bar insets; LibraryActivity pads its
content and bottom nav directly and SplashActivity stays fullscreen, both opting out via
EdgeToEdge.SelfManaged.
Opt HelpViewerActivity out of the global handler (its fitsSystemWindows layout already
insets) and document the SelfManaged rule; pad the LibraryActivity content container so
the rail and both orientations are covered; clear the IME in the global handler so fields
are not hidden; extract a unit-tested resolvePadding; fix the stale PortalActivity comments.
…erlay

Final-review fixes: remove windowSoftInputMode=adjustResize from TerminalActivity so the
global padAllAndIme is the single IME handler, and pad the install_progress overlay (a
sibling of the content container) so its controls clear the navigation bar.
The Material BottomNavigationView and NavigationRailView inset themselves for the navigation
bar, so padding the content container's bottom too left a large empty gap under the nav (seen on
Settings). Pad only the top of the content for the status bar and let the Material nav components
handle the bottom; drop the now-unused content container id.
@luisguzman-adfa
luisguzman-adfa merged commit dade552 into main Oct 2, 2026
3 checks passed
@luisguzman-adfa
luisguzman-adfa deleted the fix/K2GO-439-edge-to-edge branch October 2, 2026 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant