How to hide device keyboard when pressing an Button.pls advise.
Currently it is not possible. However in many cases you can set the EditText.ForceDone property to true and then handle EditText_EnterPressed event.
This way the user will enter the text and press Done. It will close the keyboard and do the required action.
I'm a VB6 and VBA developer rapidly getting to grips with B4A (and Android 'phones).
Which is the 'Done' key on the soft kb? I have read that 'Back' is often used ...
Thanks for any help,
Terry Dowdeswell
As an example you can also get and set it using my Reflection library which is useful for accessing things that Basic4android does not expose.
Code:
Dim Obj1, Obj2 As Reflector
Obj1.Target = View1
Obj1.RunMethod2("setKeepScreenOn", True, "java.lang.boolean")
Obj2.Target = Obj1.RunMethod("getKeepScreenOn")
Msgbox(Obj2.ToString, "KeepScreenOn")