Skip to content

android: Labs › Keyboard › No gap under the keys (#3004) - #3011

Open
opencodejr[bot] wants to merge 1 commit into
devfrom
agent/issue-3004
Open

opencodejr[bot] wants to merge 1 commit into
devfrom
agent/issue-3004

Conversation

@opencodejr

@opencodejr opencodejr Bot commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

Adds an Android keyboard lab, Labs › Keyboard › No gap under the keys (off by default), requested in #3004.

When it's on, the bottom row's keys end where the system navigation bar begins. The gap Gboard leaves under them is gone (12.2 dp on a Pixel 8: KeyboardMetrics.BOTTOM plus the row's own space under its keys).

Changes

  • TypingPreferences.flushBottom (flushBottom key), shown in Settings › Labs › Keyboard, with English and zh-CN strings like the neighbouring labs.
  • KeySize records whether the lab is on. KeyboardView.sized(height, flushBottom) and HexKeyboard rebuild an open keyboard when it changes, the same way the Height setting does (deferred while a dictation runs).
  • KeyPlaneView: the bottom row, the emoji panel's bottom row, the last row of each pad and menuHeight all get their bottom space from lastUnder(). It returns 0 with the lab on and under + bottomExtra with it off. Off, every height and padding works out to the same value as before. The rows above don't move.
  • android/README.md describes the lab. Android labs have no entry in docs/features/ or site/src/labs.json.

Credit to @dgunay for the idea and for finding where it goes (bottomExtra = -insetBottom in their fork). This is a fresh implementation; no code was copied from the fork.

Testing

  • python3 scripts/code-shape.py --check passes.
  • Not compiled: this environment has no JDK or Android SDK. Before merging, run ./gradlew assembleDebug test and check on a phone or emulator with gesture navigation, with the lab on and off, in portrait and landscape, on letters, ?123, emoji, the Hex menu and a number field.
  • I didn't add a unit test because the size depends on Android resources.

Closes #3004

@opencodejr
opencodejr Bot force-pushed the agent/issue-3004 branch 2 times, most recently from f73ae10 to c488eb7 Compare November 28, 2026 04:50
@dgunay

dgunay commented Nov 28, 2026

Copy link
Copy Markdown

@opencodejr seems there are conflicts

This branch has not been deployed

No deployments
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.

Android keyboard: setting to remove the gap under the bottom row

1 participant