Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android - Add workaround for android 11 ime insets being weird #16201

Merged
merged 2 commits into from
Jul 3, 2024

Conversation

emmauss
Copy link
Contributor

@emmauss emmauss commented Jul 2, 2024

What does the pull request do?

On android 11, forwards ime inset changes as InputPane State change events.

What is the current behavior?

On Android 11(api 30), insets have a bug where the first inset update after a config change(launching activity, orientation change) can either have 0 size, or double the actual size of the input pane on the first frame of the input pane animation. Because we calculate both the start and end bounds of the input pane at the start of the animation to enable text control editor to animate to input pane changes, on this android version, the predicted ime margin can either be covered by the input pane, or be double the input pane size at launch or when orientation changes.

What is the updated/expected behavior with this PR?

On Android 11, every change to the ime inset will be forwarded as a State change. Since the OS will send the correct insets after the animation ends, input pane margins will be corrected when the input pane is active.

How was the solution implemented (if it's not obvious)?

Checklist

Breaking changes

Obsoletions / Deprecations

Fixed issues

Fixes #16171

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0049718-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@maxkatz6 maxkatz6 added bug os-android backport-candidate-11.1.x Consider this PR for backporting to 11.1 branch labels Jul 2, 2024
@maxkatz6 maxkatz6 enabled auto-merge July 2, 2024 21:38
@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0049728-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@maxkatz6 maxkatz6 added this pull request to the merge queue Jul 2, 2024
Merged via the queue into master with commit 75821be Jul 3, 2024
11 checks passed
@maxkatz6 maxkatz6 deleted the fix/android_api_30_ime_inset branch July 3, 2024 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-candidate-11.1.x Consider this PR for backporting to 11.1 branch bug os-android
Projects
None yet
Development

Successfully merging this pull request may close these issues.

InputPane reports incorrect keyboard height
3 participants