Add a description of the goal of this merge request
On Android 11, the keyboard does not seem to be appearing when using a text input field.
On Android 10 and below, the keyboard appears just fine. I noticed this behavior with the SimpleFormDialog and SimpleInputDialog.
Please reject or modify this PR if it isn't the right approach. UI stuff is not my area of expertise, I'm just tinkering.
Testing
Run the app on Android 11, or Android 11 emulator.
Click "Text input" button. When dialog appears, keyboard should also appear.
Click "Form with different input types" button. When dialog appears, keyboard should also appear.
@mendhak thanks a lot for reporting and for submitting the merge request. I just moved that bit of code to SimpleDialog so it can be reused throughout the library.
Add a description of the goal of this merge request
On Android 11, the keyboard does not seem to be appearing when using a text input field. On Android 10 and below, the keyboard appears just fine. I noticed this behavior with the SimpleFormDialog and SimpleInputDialog.
By introducing a postDelayed, the soft keyboard appears. Ref: https://stackoverflow.com/questions/5520085/android-show-softkeyboard-with-showsoftinput-is-not-working
Please reject or modify this PR if it isn't the right approach. UI stuff is not my area of expertise, I'm just tinkering.
Testing
Run the app on Android 11, or Android 11 emulator.
Click "Text input" button. When dialog appears, keyboard should also appear.
Click "Form with different input types" button. When dialog appears, keyboard should also appear.
Before:
https://user-images.githubusercontent.com/746276/134811204-53910c64-1d74-4063-9655-ef7e9c22bd9f.mp4
After:
https://user-images.githubusercontent.com/746276/134811208-a96bd6c1-0f87-405d-8b16-722c2d193c52.mp4