I have an activity A that just had buttons on it. One of the buttons starts a new activity B that does have a textbox on it.
But if I click the back key while the keyboard is being displayed on B, when the screen re-displayes A, the keyboard is still displayed even though A has not text boxes on it.
Do I really need to do create the IME object for every activity that uses a keyboard, then do a IME.Hidekeyboard in B's Activity_Pause sub to prevent this from happening?
I would think such housekeeping should be handled automatically by the OS?
Sorry - my bad....the back key is not being used. Instead, the user is clicking a "SAVE" button, and the code behind the Save Button is closing the form (activity.finish).
So, if I have code that closes an activity, is it always necessary for my code to use IME to also close the keyboard for every activity that has a textbox on it?
The user can always close the keyboard by pressing on the back key. If you want it to close automatically in this case then you will need to do it with the IME library.
So basically, any activity which I close programmically (and has a textbox on it), then I need to use IME to manually hide the keyboard to make sure it wont be shown on the next activity shown.
Wow, I think the OS should take care of hiding the keyboard automatically if the next activity doesn't have any textboxes on it.