M mscientist33 Active Member Licensed User Apr 13, 2022 #1 I am using the FileDialog. Everything works correct except it does not close the keyboard. B4X: Copy 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 Any ideas?
I am using the FileDialog. Everything works correct except it does not close the keyboard. B4X: Copy 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 Any ideas?
LucaMs Expert Licensed User Longtime User Apr 13, 2022 #2 You should use the IME library and close the keyboard using its method. Anyway, take a look at this: https://www.b4x.com/android/forum/t...t-of-other-related-methods.129897/post-816969 Upvote 0
You should use the IME library and close the keyboard using its method. Anyway, take a look at this: https://www.b4x.com/android/forum/t...t-of-other-related-methods.129897/post-816969
M mscientist33 Active Member Licensed User Apr 13, 2022 #3 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. Upvote 0
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.
M mscientist33 Active Member Licensed User Apr 13, 2022 #4 Found out my problem. On closing the edittext was getting focus back re-opening the keyboard...... just requested focus for a button after the code... I take that back... that only works in one place in my code... I guess I should be asking how to click the "Done" button programmatically? Last edited: Apr 13, 2022 Upvote 0
Found out my problem. On closing the edittext was getting focus back re-opening the keyboard...... just requested focus for a button after the code... I take that back... that only works in one place in my code... I guess I should be asking how to click the "Done" button programmatically?
M mscientist33 Active Member Licensed User Apr 18, 2022 #5 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. Upvote 0
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.
agraham Expert Licensed User Longtime User Apr 18, 2022 #6 If you are using the FileDialog from my Dialogs2 library try a Sleep before hiding the keyboard. try different sleep periods if necessary. B4X: Copy 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 Last edited: Apr 18, 2022 Upvote 0
If you are using the FileDialog from my Dialogs2 library try a Sleep before hiding the keyboard. try different sleep periods if necessary. B4X: Copy 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
M mscientist33 Active Member Licensed User Apr 18, 2022 #7 I am currently using the Dialogs library 4.01. I will see how hard it would be to swap out with your Dialogs2 library (once I find it ) Upvote 0
I am currently using the Dialogs library 4.01. I will see how hard it would be to swap out with your Dialogs2 library (once I find it )
agraham Expert Licensed User Longtime User Apr 18, 2022 #8 Dialogs2 library - an update to the original Dialogs library 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... www.b4x.com Upvote 0
Dialogs2 library - an update to the original Dialogs library 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... www.b4x.com