game-activity: added missing match arm for NativeAppGlueAppCmd_APP_CMD_SOFTWARE_KB_VIS_CHANGED#212
Conversation
…D_SOFTWARE_KB_VIS_CHANGED
|
Instead of exposing a VisibilityChanged event publicly, my current preference here is to patch the GameActivity backend to never send the (unused) APP_CMD_SOFTWARE_KB_VIS_CHANGED event. This is what I recently did while looking at enabling IME in winit: My rough reasoning here is that:
From an application point of view it would probably be a trap / mistake to try and trust this visibility state because it would probably mean you're overlooking the possibility that someone has a physical keyboard / floating keyboard. Android doesn't provide a reliable way of tracking soft keyboard visibility and applications should likely re-assert the visibility they want when they start/stop text input (e.g. every time you tap a text input field you request to show the keyboard, regardless of what you know about its current visibility). |
|
That sounds good to me. Should I just close this PR? |
|
No worries - I'll look at opening PRs for the APP_CMD_SOFTWARE_KB_VIS_CHANGED change I made + exposing editor actions and can close this in the process of merging the other change if we're still agreed that there's no pressing use case for exposing a VisibilityChanged event. |
Launching a fragment with an EditText widget on top of an AGDK view and bringing up the soft keyboard generates the event and hits the unreachable! at the end of the match statement.