Android Question How do I force the keyboard to show on a textbox focus

davepamn

Active Member
Licensed User
Longtime User
I activated the IME library

Sub Globals
oIME as ime
end sub

sub activity_create(firstime as boolean)
oIME.Initialize("Keyboard")
end sub

if a radiobutton is clicked than I set the focus on a textbox and then want the keyboard to appear automatically. It speeds up user interaction.

sub radioCustom_checkedchange(checked as boolean)
txtTruckNumber.requestfocus 'works
oIME.ShowKeyboard(activity) 'fails
end sub
 

barx

Well-Known Member
Licensed User
Longtime User
Don't request focus. Instead do

B4X:
oIME.showKeyboard(txtTrunkNumber)
 
Upvote 0

barx

Well-Known Member
Licensed User
Longtime User
I believe it says View. I View being an Android control. The online docs definitely say View. Glad it works though ;)
 
Upvote 0
Top