Skip to content

fix(layout): paint IME navigation bar frame and reserve its real height - #811

Merged
LeanBitLab merged 1 commit into
mainfrom
fix/ime-nav-bar-frame
Nov 14, 2026
Merged

LeanBitLab merged 1 commit into
mainfrom
fix/ime-nav-bar-frame

Conversation

@LeanBitLab

Copy link
Copy Markdown
Owner

Summary of Changes

On Android 15+ the IME draws its own NavigationBarFrame (chevron, IME switcher, gesture handle) below the input view. This PR paints that frame and reserves its real height.

Motivation & Context

When the keyboard opened, the navigation bar strip under it was transparent and the app behind showed through. After painting it, the bottom rows could still sit under the nav row, or leave a gap, depending on the focused app.

Root cause, measured with cmd window dump-visible-window-views on a POCO M2 Pro (gesture navigation, display 1080x2400):

  • The NavigationBarFrame is 126px tall and has no background. window.navigationBarColor does not reach it with edge-to-edge enforced.
  • The padding under the keys came from the system nav inset (63px), which is smaller than the frame and varies by focused app, so the keyboard ended under the nav row (Telegram, launcher).

Changes Made

  • LatinIME.setNavigationBarColor() also paints the IME NavigationBarFrame with the nav bar color (and clears it when the custom nav bar color setting is off). New findNavigationBarFrame() helper.
  • InputView.updateBottomPadding() reserves the measured frame height instead of the system inset, and re-runs when the frame is laid out. Falls back to the old inset logic when no frame exists.

Verification & Testing

  • Build compiles cleanly via ./gradlew :app:assembleStandardDebug
  • Tested on device / emulator (POCO M2 Pro, gesture navigation, in the launcher, Telegram and a settings screen)
  • Verified zero typing latency impact on the input path (no input path code touched, not measured)
  • Checked for regressions across light and dark themes (only checked a dark theme)

Not tested: floating mode, 3-button navigation, custom nav bar color turned off.

Guidelines Checklist

  • This PR addresses a single focused concern.
  • Follows coding guidelines in CONTRIBUTING.md.
  • Does not add unnecessary dependencies or binary blobs.
  • No em dashes used in comments, descriptions, or documentation.

On Android 15+ the IME draws its own NavigationBarFrame below the input view.
It has no background, and window.navigationBarColor does not reach it, so the
app behind showed through the nav strip. Paint it with the navigation bar
color.

The frame can also be taller than the system navigation bar inset, so the
keyboard's bottom rows ended up under it. Reserve the measured frame height
instead of the inset, and update the padding when the frame is laid out.
@LeanBitLab
LeanBitLab merged commit abb8a64 into main Nov 14, 2026
1 check passed
@LeanBitLab
LeanBitLab deleted the fix/ime-nav-bar-frame branch November 14, 2026 21:19
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

⌂ Proxy