Android Question how to hide the keyboard on first show of B4XSearchTemplate

AnandGupta

Expert
Licensed User
Longtime User
Using B4XSearchTemplate in B4A, the keyboard is auto opened on display of the list.

Without modifying the b4xlib, can I hide the keyboard on first show ?
User should be able to open keyboard on touch of 'Search' text box.
 
Solution
Without modifying the b4xlib, can I hide the keyboard on first show ?
Yes.
B4X:
Dim dialogObject As Object = Dialog.ShowTemplate(SearchTemplate, "", "", "CANCEL")
    Sleep(0)  'important line. If 0 not enough make it 25 or so
    ime.HideKeyboard  'need IME lib and it needs to be initialized
    Wait For (dialogObject) Complete (Result As Int)

Mahares

Expert
Licensed User
Longtime User
Without modifying the b4xlib, can I hide the keyboard on first show ?
Yes.
B4X:
Dim dialogObject As Object = Dialog.ShowTemplate(SearchTemplate, "", "", "CANCEL")
    Sleep(0)  'important line. If 0 not enough make it 25 or so
    ime.HideKeyboard  'need IME lib and it needs to be initialized
    Wait For (dialogObject) Complete (Result As Int)
 
Upvote 1
Solution

AnandGupta

Expert
Licensed User
Longtime User
changed it to ,
B4X:
Sleep(100)  'important line. If 0 not enough make it 25 or so
to work.

now the keyboard shows on start, but then closes.
thanks.
 
Upvote 0
Top