I am using the FileDialog. Everything works correct except it does not close the keyboard.
B4X:
Private sf As Object=fd.ShowAsync("Save file: " ,"OK","Cancel","",Null,False)
wait for (sf) dialog_result (rt As Int)
If rt=DialogResponse.POSITIVE Then
ToastMessageShow(fd.ChosenName , False)
End If
I have tried using the IME library. I tried putting the ime.HideKeyboard after the code about but it does not hide. I have considered the content chooser but it seems to be difficult to use compared to the FileDialog as I have to use external storage and I need to be able to return the file selected when doing a file open.
I see that my problem has been you *must* click the Done button on the keyboard, just hitting ok on the dialog will not close the keyboard..... Irritating as user but I guess it is what it is.
If you are using the FileDialog from my Dialogs2 library try a Sleep before hiding the keyboard. try different sleep periods if necessary.
B4X:
Dim fda As Object = fd.ShowAsync("B4A File Dialog", "Yes", "No", "Maybe", Bmp, False)
Wait For (fda) Dialog_Result(ret As Int)
Dim IME As IME
IME.Initialize("")
Sleep(50)
IME.HideKeyboard
Note the separate download for an updated Dialogs2 class that fixes a bug in the original. I wrote the original Dialogs library many moons ago and it has suffered with age owing to the changes made to Android and B4A over the years despite the administrations of several other people. Although...