Android Question Keyboard remains after Gmail closes

terminator2

Member
Licensed User
Longtime User
The following code opens the gMail app and sends a message as expected. When I hit send the soft keyboard (that was loaded by the Gmail app) remains open and covers half my app until I manually close it. How do I force the keyboard to go away along with the dismissed mail app?
Public Sub contactUs(mapData As Map)
Private Message As Email
Public p As Phone

Message.Body = mapData.Get("body")
Message.To.Add("[email protected]")
Message.Subject = "Message from My App"
StartActivity(Message.GetIntent)
End Sub
 
Last edited:

terminator2

Member
Licensed User
Longtime User
I managed to do it with:

Sub Activity_Resume
IME.HideKeyboard
End Sub

On each activity that calls Gmail App.

I still don't know why Gmail didn't close the keyboard when it lost focus.
 
Last edited:
Upvote 0
Top