Skip to content

fix(android): resize WebView when soft keyboard opens#497

Open
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
devin/1777307521-android-keyboard-resize
Open

fix(android): resize WebView when soft keyboard opens#497
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
devin/1777307521-android-keyboard-resize

Conversation

@devin-ai-integration
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot commented Apr 27, 2026

Summary

Fixes #496 — On Android, the chat input and toolbar options (model selector, web search toggle, etc.) were hidden behind the soft keyboard when it opened. This is a known Tauri issue where the Android WebView doesn't resize by default when the keyboard appears.

Two changes, both Android-only:

  1. AndroidManifest.xml: Added android:windowSoftInputMode="adjustResize" to the activity so the system resizes the window when the keyboard opens (pre-Android 11 compat).
  2. MainActivity.kt: Updated the window insets listener to include IME (keyboard) insets via WindowInsetsCompat.Type.ime(). Uses maxOf(systemBars.bottom, ime.bottom) so bottom padding accounts for whichever is taller — the navigation bar or the keyboard.

These files are only compiled into the Android build, so iOS, desktop, and web are completely unaffected.

Review & Testing Checklist for Human

  • Build and install on an Android device, open a chat, tap the text input, and confirm the input + toolbar options stay visible above the keyboard
  • Verify scrolling through chat messages still works correctly while the keyboard is open
  • Spot-check iOS to confirm no regression (these files aren't part of the iOS build, but worth a sanity check)

Notes

Link to Devin session: https://app.devin.ai/sessions/535aeeac8c1848129d556b48ba36537f
Requested by: @AnthonyRonning


Open in Devin Review

Add windowSoftInputMode=adjustResize to AndroidManifest.xml and handle
IME insets in MainActivity.kt so the chat input and toolbar options
remain visible above the keyboard.

Fixes #496

Co-Authored-By: tony@opensecret.cloud <TonyGiorgio@protonmail.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying maple with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6dda02e
Status: ✅  Deploy successful!
Preview URL: https://22448835.maple-ca8.pages.dev
Branch Preview URL: https://devin-1777307521-android-key.maple-ca8.pages.dev

View logs

@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link
Copy Markdown
Contributor Author

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

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.

Mobile app - The chatbox is hard centered on the screen and does not scroll when the keyboard opens

1 participant