Skip to content

Keep text fields above the keyboard on Android - #413

Merged
horner merged 2 commits into
mainfrom
fix/android-keyboard-avoiding
Dec 5, 2026
Merged

horner merged 2 commits into
mainfrom
fix/android-keyboard-avoiding

Conversation

@morepriyam

@morepriyam morepriyam commented Dec 4, 2026 •

Copy link
Copy Markdown
Collaborator

Evidence (Pixel 6a, Android 17 beta)

Before (main) After (this PR) After: description sheet
Caption entry hidden behind the keyboard Caption entry row above the keyboard Description sheet above the keyboard

Before: the keyboard covers the caption you're typing.

413-before.mp4

After: the entry row sits above the keyboard.

413-after.mp4

After: the new project description sheet.

413-after-description.mp4

Fixes #409.
Part of #335.

Problem

On Android 15 and newer the keyboard covers text entry:

You can't see what you type or tap Done/Save until Back hides the keyboard.

Cause

With edge-to-edge, which Android 15 enforces and Expo SDK 57 turns on, the window no longer resizes for the keyboard. These screens set KeyboardAvoidingView's behavior to padding on iOS and to nothing on Android, so on Android nothing moved. voiceover-transcript-sheet.tsx already used padding on both platforms.

Change

behavior="padding" on both platforms in the five screens that used the iOS-only form:

  • editor-screen.tsx (caption entry);
  • description-sheet.tsx;
  • export-screen.tsx;
  • new-project-screen.tsx;
  • ai-edit-screen.tsx.

The now-unused Platform imports are removed. iOS behavior is unchanged (it was already padding).

Checks

  • npx tsc --noEmit, npx tsc --noEmit -p embed, npm run lint, Prettier on the changed files: pass.
  • Full Jest: 2,906 passed, 9 skipped.
  • npm run check:embed: pass.

Bench

Pixel 6a, Android 17 beta, default text size. Build: main + the open sprint PRs + this change, as a JS bundle on the sprint test build.

  • Description sheet: focusing the field brings up the keyboard, and the sheet now sits above it. Save and Cancel are at y 1302–1438 px; the keyboard starts at about 1500.
  • Caption entry: Cancel / text / Done now sit directly above the keyboard, and the typed word is visible.
Description sheet Caption entry
Before
After

Phone flow

Yes: text entry with the keyboard open on Android. The controls stay in the lower half, just above the keyboard. Checked on the Pixel 6a at default text size.

NOT RUN:

  • Export, New project and AI edit with the keyboard on Android (same change, same pattern).
  • Largest text.
  • iPhone (unchanged code path).
  • Physical thumb reach.

Risks

  • On an Android device where the window still resizes for the keyboard, padding would add space twice. With Expo's edge-to-edge on every supported version, that shouldn't happen. Check the 2.10.1 build on a second Android phone if one is available.

On Android 15 and later the window no longer resizes for the keyboard (edge-to-edge), and these screens set KeyboardAvoidingView's behavior only on iOS, so the caption entry row, the project description sheet and other fields stayed behind the keyboard. They now use padding on both platforms, as the voiceover transcript sheet already does.
Copilot AI balanced review requested due to automatic review settings December 4, 2026 20:00

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Reported Android device checks cover only caption and description entry on a build combined with other open PRs, so they do not establish this PR’s behavior in isolation. Native keyboard and window-resize validation remains needed for Export, New project, AI edit, large text, and a second phone’s resize configuration; static review cannot settle those interactions.

No open issues 🎉

What changed in this PR

Addresses #409 by enabling keyboard-avoiding padding on Android across five text-entry screens, while preserving iOS behavior.

Changes:

  • Uses behavior="padding" on both platforms.
  • Removes unused Platform imports.
  • Reports Pixel 6a validation for captions and descriptions; other affected flows and large-text checks remain unverified.
File Description
src/​features/​project-summary/​new-project-screen.tsx Enables Android keyboard padding for project creation.
src/​features/​export/​export-screen.tsx Enables Android keyboard padding for export.
src/​features/​editor/​editor-screen.tsx Enables Android keyboard padding for caption entry.
src/​features/​editor/​description-sheet.tsx Enables Android keyboard padding for description editing.
src/​features/​ai-edit/​ai-edit-screen.tsx Enables Android keyboard padding for AI editing.

Review effort: Balanced

@horner
horner added this pull request to the merge queue Dec 5, 2026
Merged via the queue into main with commit 00e3d16 Dec 5, 2026
10 checks passed
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 15+: the keyboard covers caption editing and the project description sheet

3 participants