Android Question ShowKeyboard does not work - please help

aedwall

Active Member
Licensed User
I have been trying everything I can think of to make my txtCity EditText control open the soft keyboard automatically. Can someone please help me?

B4X:
  Dim IME1 As IME
  Dim txtCity As EditText

  IME1.Initialize("IME")
      
  txtCity.InputType = txtCity.INPUT_TYPE_TEXT
  txtCity.RequestFocus

  IME1.ShowKeyboard(txtCity)
UPDATE: I inserted this in the manifest ediotr:

SetActivityAttribute(<activity name>, android:windowSoftInputMode, stateVisible)

I used Main for "<activity name>"?

Now, how do I get the keyboard to hide itself?

Answer: I inserted this command when I was finished - IME1.HideKeyboard

I hope this helps others.
 
Last edited:
Top