-
Notifications
You must be signed in to change notification settings - Fork 158
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
hide keyboard on resume #1170
hide keyboard on resume #1170
Conversation
This seems to have resolved this issue. @vitorpamplona my only guess is that low memory on the device stops and resumes the app occasionally and the Old phones (tried Oreo):The adjustResize causes the keyboard to always be up when app is resumed. From google docs: "Android gives focus to the first text field in your layout when the activity starts". (https://developer.android.com/develop/ui/views/touch-and-input/keyboard-input/visibility) It looks like the "Status update" field is put in focus and the keyboard is shown. Exiting a text field does NOT close the keyboard on older phones. The keyboard has to be minimised manually. Using stateHidden will not show keyboard on resume... Even if a text field is in focus (eg. create a not or login screen nsec). One has to click on the text field for keyboard to show up Newer phones (tried API 34):The keyboard is not shown on resume, the "Status update" is not in focus. If you exit a text field the keyboard is closed automatically. Only drawback with this change I noticed on newer phones: If you exit app while in a text field and resume the keyboard will not show until you click the text field again. |
Interesting. IMHO I don't know if it's much of a drawback though. 🤔 |
Just investitigating one more on device workaround with the user before requesting this pull request. |
Got it. |
Marking as ready for merge as the user reported this fix is the only thing that resolves their "popping up-onscreen keyboard" issue on their Samsung A5 Android 8 device. |
Hum... isn't this an issue with the status update in the drawer being in focus? That element is not visible so the code for the drawer shouldn't even be running. We might need to keep resize there, like on |
I agree. There should be a higher percentage of newer phones that benefit from keyboard being closed/open promptly than this fix. Maybe there is a solution to avoid focus in elements that are not visible. Perhaps using I'm happy to close this! |
workaround for #1166