fix(ime): targetSdk 36 + explicit insets — Android 16+ IME show failure (#59) - #60
Merged
Merged
Conversation
#59) ROOT CAUSE: targetSdk = 35. On Android 16+ (API 36+), apps targeting below 36 get compatibility restrictions that prevent the IME insets animation from completing (PHASE_IME_ON_SHOW_SOFT_INPUT_TRUE) — onStartInputView never fires, the keyboard never renders. Verified: even a plain green View failed to show. Fix: - targetSdk + compileSdk = 36: opts in to API 36 behavior - onComputeInsets: MEASURED from the docked root's actual position (review C1/C3: imeHeightPx() is a height not an offset — the constant created a dead touch band and was wrong in floating mode; getLocationInWindow handles both modes correctly) - onEvaluateInputViewShown = true: accessibility decision — our motor-impaired users always want the soft keyboard, even with a hardware keyboard attached (review I2: kept with honest comment) - dockedRoot ordering: assigned BEFORE setDockedHeight (review C2: the original claim was correct but wasn't in the diff) Signed-off-by: will wade <willwade@gmail.com>
willwade
force-pushed
the
fix/ime-api36-window
branch
from
September 18, 2026 06:07
b89611f to
ce1add6
Compare
5 tasks
willwade
added a commit
that referenced
this pull request
Sep 18, 2026
## What Persists the last-used dock/float mode (SharedPreferences, `dasher_ime/start_mode`) and restores it after engine creation on the next keyboard show. Docked stays the default. ## Why Heide's v0.1.20 feedback: she wants the keyboard to "start directly as docked, like other keyboards do" — on v0.1.16/Android 16 she had to tap Float then Dock to get a working keyboard (that initial-show bug is already fixed by #60's targetSdk 36; this PR makes the *preference* stick regardless). ## Guards - Floating restore only runs when `canDrawOverlays` is already granted — never bounces the user to system settings on open - A failed float (addView exception fallback path) does not persist `floating` - Button wiring moved to a `floatDockBtn` field (was a local passed as a parameter); nulled in onDestroy ## Test plan - [ ] Fresh install: keyboard opens docked - [ ] Float → hide → reopen: opens floating - [ ] Dock → hide → reopen: opens docked - [ ] Without overlay permission + saved floating: opens docked, no settings bounce - [ ] `./gradlew :app:compileDebugKotlin :app:lintDebug` clean (verified locally) Refs #61 #63 (same feedback email). Signed-off-by: will wade <willwade@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #59 — Heide's Samsung Android 16 report: IME doesn't show in dock or float mode. Root cause: targetSdk = 35 triggers compatibility restrictions on Android 16+ that prevent the insets animation from completing. Even a plain View returned from onCreateInputView failed to show. Bumping to targetSdk 36 + adding explicit insets overrides fixes it. DCO signed.