Android Question Close Keyboard does not work

Samplatiner

Member
Licensed User
Longtime User
Hello everyone,

is there a reason because of that this code does NOT Close the Keyboard?
(The keyboard is open, because the user clicked in a edittext, I want to Close it when the user clicks on a button)

B4X:
Dim phone1 As Phone
phone1.HideKeyboard(Activity)
Dim ime1 As IME
ime1.Initialize("")
ime1.HideKeyboard

It is part of a larger Project i dont want to upload.
If I write a example Project, it works.

For reasons of testing I added
B4X:
DoEvents
but that did not help.

I would be very happy if someone could give me a hint :)
 

Samplatiner

Member
Licensed User
Longtime User
ok, I managed to get the Code working, by closing the Keyboard inside of the Sub, in which the edittext is written.

I don't know why it works now, but for the Moment it's OK for me like this. Maybe it's something about the Focus, that's quite possible.

Thanks a lot for your hint. It still helped me to get it working :)
 
Upvote 0
Top