Android Question How to avoid DoEvents in this case?

LucaMs

Expert
Licensed User
Longtime User
I have an invisible EditText; when I set it to visible I want to show an IME keyboard (which puts the focus on it).

I used code similar to this:
B4X:
EditText1.Visible = True
CallSubDelayed2(Me, "ShowKeybord", EditText1)


Sub ShowKeybord(et As EditText)
    IMEKeyboard.ShowKeyboard(et)
End Sub

It works in debug mode; in release mode the EditText gets the focus but the sw keyboard is not shown.
Writing a DoEvents before IMEKeyboard.ShowKeyboard(et), all work as expected.


How to avoid DoEvents in this case?
 
Top