[android-developers] Re: No View key event called back when BACK key is pressed while IME is shown?
did you try to use RESULT_HIDDEN parameter for showSoftInput() function? http://developer.android.com/reference/android/view/inputmethod/InputMethodManager.html#RESULT_HIDDEN I tried it but doesn't work, I only get notification that keyboard is shown. onSizeChanged() doesnt work for me (probably because I run on full screen). On Mar 11, 6:27 pm, jamesc jame...@gmail.com wrote: I only discovered that thread this morning. I tried many different ways of 'catching' the IME show/hide, and that is, as Dianne says. the only way of doing it. Not only is there the issue of the BACK key, but there's the Sense UI (as the OP in the link I posted stated) with it's additional 'hide keyboard' IME key. So, I've just implemented the suggested method (onSizeChanged()) and it, unsurprisingly, works a treat! On Mar 11, 4:27 pm, Sean Hodges seanhodge...@googlemail.com wrote: And is that the approach you are planning to go for? On Thu, Mar 11, 2010 at 3:38 PM, jamesc jame...@gmail.com wrote: It appears (the endBatchEdit() didn't work out) that the correct way has been stated before by Dianne: http://groups.google.com/group/android-developers/browse_thread/threa... On Mar 11, 3:14 pm, Sean Hodges seanhodge...@googlemail.com wrote: I believe the back button event is intercepted by the keyboard app, so it knows to hide. Once focus is returned to your app, the event has already been processed. I'm not aware of any way to intercept the events of another app (like the soft keyboard). You could write your own keyboard app that passes the back button event as an intent, but I imagine that's not the solution you are looking for. If the endBatchEdit() method is working for you, I would stick with it. Alternatively, you might want to re-think your approach to this problem, as there are lots of soft keyboard apps out there and there is a chance they won't all play nice with your custom integration... On Thu, Mar 11, 2010 at 11:01 AM, mariush mariusz...@gmail.com wrote: Did you solve this? Anyone knows solution to this problem? On 8 Lut, 19:35, jamesc jame...@gmail.com wrote: If theBACKbutton is pressed when the soft keyboard is being displayed, noBACKkeycode event is generated (when it's not shown, andBACKis pressed, then my View's onKeyDown()/onKeyUp() methods get calledback). Is this expected behaviour? I'm trying to catch when the IME is hidden uponBACKbeing pressed. I'm currently working around this in the endBatchEdit() method (I'm implementing BaseInputConnection). Any help gratefully received, as ever. Cheers James -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: No View key event called back when BACK key is pressed while IME is shown?
onSizeChanged() doesn't work for me. I tried using ResultReceiver: inputMehtodManager.showSoftInput(editor, InputMethodManager.RESULT_HIDDEN, rr); http://developer.android.com/reference/android/view/inputmethod/InputMethodManager.html#RESULT_HIDDEN but it doesn't work, I only get notification that Keyboard was shown. Did you try this? On Mar 11, 6:27 pm, jamesc jame...@gmail.com wrote: I only discovered that thread this morning. I tried many different ways of 'catching' the IME show/hide, and that is, as Dianne says. the only way of doing it. Not only is there the issue of theBACKkey, but there's the Sense UI (as the OP in the link I posted stated) with it's additional 'hide keyboard' IME key. So, I've just implemented the suggested method (onSizeChanged()) and it, unsurprisingly, works a treat! On Mar 11, 4:27 pm, Sean Hodges seanhodge...@googlemail.com wrote: And is that the approach you are planning to go for? On Thu, Mar 11, 2010 at 3:38 PM, jamesc jame...@gmail.com wrote: It appears (the endBatchEdit() didn't work out) that the correct way has been stated before by Dianne: http://groups.google.com/group/android-developers/browse_thread/threa... On Mar 11, 3:14 pm, Sean Hodges seanhodge...@googlemail.com wrote: I believe thebackbutton event is intercepted by the keyboard app, so it knows to hide. Once focus is returned to your app, the event has already been processed. I'm not aware of any way to intercept the events of another app (like the soft keyboard). You could write your own keyboard app that passes thebackbutton event as an intent, but I imagine that's not the solution you are looking for. If the endBatchEdit() method is working for you, I would stick with it. Alternatively, you might want to re-think your approach to this problem, as there are lots of soft keyboard apps out there and there is a chance they won't all play nice with your custom integration... On Thu, Mar 11, 2010 at 11:01 AM, mariush mariusz...@gmail.com wrote: Did you solve this? Anyone knows solution to this problem? On 8 Lut, 19:35, jamesc jame...@gmail.com wrote: If theBACKbutton is pressed when the soft keyboard is being displayed, noBACKkeycode event is generated (when it's not shown, andBACKis pressed, then my View's onKeyDown()/onKeyUp() methods get calledback). Is this expected behaviour? I'm trying to catch when the IME is hidden uponBACKbeing pressed. I'm currently working around this in the endBatchEdit() method (I'm implementing BaseInputConnection). Any help gratefully received, as ever. Cheers James -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: No View key event called back when BACK key is pressed while IME is shown?
I understand that the RESULT_* flags are only used within the ResultReceiver. That is, you implement a ResultReceiver and then the framwork will call its send() method with the result of the attempt to either show or hide the IME. So the options for showing the IME are SHOW_FORCE and SHOW_IMPLICIT (the docs say that 0 is also possible, but I don't know what this indicates, or whether the docs are correct as it also states that the only other optio is SHOW_IMPLICIT). When you say you're running in fullscreen, do you mean in portrait or in landscape? There's a bug where the adjustResize manifest flag (you do have that in place for you Activity don't you, as it's required to get the the callbacks? An alternative is the SOFT_INPUT_ADJUST_RESIZE flag on the Window) is ignored if FLAG_FULLSCREEN is also applied to the Window. Defect is here: http://code.google.com/p/android/issues/detail?id=5497 On Mar 12, 11:04 am, polew...@opera.com polew...@opera.com wrote: onSizeChanged() doesn't work for me. I tried using ResultReceiver: inputMehtodManager.showSoftInput(editor, InputMethodManager.RESULT_HIDDEN, rr); http://developer.android.com/reference/android/view/inputmethod/Input... but it doesn't work, I only get notification that Keyboard was shown. Did you try this? On Mar 11, 6:27 pm, jamesc jame...@gmail.com wrote: I only discovered that thread this morning. I tried many different ways of 'catching' the IME show/hide, and that is, as Dianne says. the only way of doing it. Not only is there the issue of theBACKkey, but there's the Sense UI (as the OP in the link I posted stated) with it's additional 'hide keyboard' IME key. So, I've just implemented the suggested method (onSizeChanged()) and it, unsurprisingly, works a treat! On Mar 11, 4:27 pm, Sean Hodges seanhodge...@googlemail.com wrote: And is that the approach you are planning to go for? On Thu, Mar 11, 2010 at 3:38 PM, jamesc jame...@gmail.com wrote: It appears (the endBatchEdit() didn't work out) that the correct way has been stated before by Dianne: http://groups.google.com/group/android-developers/browse_thread/threa... On Mar 11, 3:14 pm, Sean Hodges seanhodge...@googlemail.com wrote: I believe thebackbutton event is intercepted by the keyboard app, so it knows to hide. Once focus is returned to your app, the event has already been processed. I'm not aware of any way to intercept the events of another app (like the soft keyboard). You could write your own keyboard app that passes thebackbutton event as an intent, but I imagine that's not the solution you are looking for. If the endBatchEdit() method is working for you, I would stick with it. Alternatively, you might want to re-think your approach to this problem, as there are lots of soft keyboard apps out there and there is a chance they won't all play nice with your custom integration... On Thu, Mar 11, 2010 at 11:01 AM, mariush mariusz...@gmail.com wrote: Did you solve this? Anyone knows solution to this problem? On 8 Lut, 19:35, jamesc jame...@gmail.com wrote: If theBACKbutton is pressed when the soft keyboard is being displayed, noBACKkeycode event is generated (when it's not shown, andBACKis pressed, then my View's onKeyDown()/onKeyUp() methods get calledback). Is this expected behaviour? I'm trying to catch when the IME is hidden uponBACKbeing pressed. I'm currently working around this in the endBatchEdit() method (I'm implementing BaseInputConnection). Any help gratefully received, as ever. Cheers James -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: No View key event called back when BACK key is pressed while IME is shown?
Did you solve this? Anyone knows solution to this problem? On 8 Lut, 19:35, jamesc jame...@gmail.com wrote: If theBACKbutton is pressed when the soft keyboard is being displayed, noBACKkeycode event is generated (when it's not shown, andBACKis pressed, then my View's onKeyDown()/onKeyUp() methods get calledback). Is this expected behaviour? I'm trying to catch when the IME is hidden uponBACKbeing pressed. I'm currently working around this in the endBatchEdit() method (I'm implementing BaseInputConnection). Any help gratefully received, as ever. Cheers James -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: No View key event called back when BACK key is pressed while IME is shown?
I believe the back button event is intercepted by the keyboard app, so it knows to hide. Once focus is returned to your app, the event has already been processed. I'm not aware of any way to intercept the events of another app (like the soft keyboard). You could write your own keyboard app that passes the back button event as an intent, but I imagine that's not the solution you are looking for. If the endBatchEdit() method is working for you, I would stick with it. Alternatively, you might want to re-think your approach to this problem, as there are lots of soft keyboard apps out there and there is a chance they won't all play nice with your custom integration... On Thu, Mar 11, 2010 at 11:01 AM, mariush mariusz...@gmail.com wrote: Did you solve this? Anyone knows solution to this problem? On 8 Lut, 19:35, jamesc jame...@gmail.com wrote: If theBACKbutton is pressed when the soft keyboard is being displayed, noBACKkeycode event is generated (when it's not shown, andBACKis pressed, then my View's onKeyDown()/onKeyUp() methods get calledback). Is this expected behaviour? I'm trying to catch when the IME is hidden uponBACKbeing pressed. I'm currently working around this in the endBatchEdit() method (I'm implementing BaseInputConnection). Any help gratefully received, as ever. Cheers James -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: No View key event called back when BACK key is pressed while IME is shown?
It appears (the endBatchEdit() didn't work out) that the correct way has been stated before by Dianne: http://groups.google.com/group/android-developers/browse_thread/thread/9d1681a01f05e782 On Mar 11, 3:14 pm, Sean Hodges seanhodge...@googlemail.com wrote: I believe the back button event is intercepted by the keyboard app, so it knows to hide. Once focus is returned to your app, the event has already been processed. I'm not aware of any way to intercept the events of another app (like the soft keyboard). You could write your own keyboard app that passes the back button event as an intent, but I imagine that's not the solution you are looking for. If the endBatchEdit() method is working for you, I would stick with it. Alternatively, you might want to re-think your approach to this problem, as there are lots of soft keyboard apps out there and there is a chance they won't all play nice with your custom integration... On Thu, Mar 11, 2010 at 11:01 AM, mariush mariusz...@gmail.com wrote: Did you solve this? Anyone knows solution to this problem? On 8 Lut, 19:35, jamesc jame...@gmail.com wrote: If theBACKbutton is pressed when the soft keyboard is being displayed, noBACKkeycode event is generated (when it's not shown, andBACKis pressed, then my View's onKeyDown()/onKeyUp() methods get calledback). Is this expected behaviour? I'm trying to catch when the IME is hidden uponBACKbeing pressed. I'm currently working around this in the endBatchEdit() method (I'm implementing BaseInputConnection). Any help gratefully received, as ever. Cheers James -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: No View key event called back when BACK key is pressed while IME is shown?
And is that the approach you are planning to go for? On Thu, Mar 11, 2010 at 3:38 PM, jamesc jame...@gmail.com wrote: It appears (the endBatchEdit() didn't work out) that the correct way has been stated before by Dianne: http://groups.google.com/group/android-developers/browse_thread/thread/9d1681a01f05e782 On Mar 11, 3:14 pm, Sean Hodges seanhodge...@googlemail.com wrote: I believe the back button event is intercepted by the keyboard app, so it knows to hide. Once focus is returned to your app, the event has already been processed. I'm not aware of any way to intercept the events of another app (like the soft keyboard). You could write your own keyboard app that passes the back button event as an intent, but I imagine that's not the solution you are looking for. If the endBatchEdit() method is working for you, I would stick with it. Alternatively, you might want to re-think your approach to this problem, as there are lots of soft keyboard apps out there and there is a chance they won't all play nice with your custom integration... On Thu, Mar 11, 2010 at 11:01 AM, mariush mariusz...@gmail.com wrote: Did you solve this? Anyone knows solution to this problem? On 8 Lut, 19:35, jamesc jame...@gmail.com wrote: If theBACKbutton is pressed when the soft keyboard is being displayed, noBACKkeycode event is generated (when it's not shown, andBACKis pressed, then my View's onKeyDown()/onKeyUp() methods get calledback). Is this expected behaviour? I'm trying to catch when the IME is hidden uponBACKbeing pressed. I'm currently working around this in the endBatchEdit() method (I'm implementing BaseInputConnection). Any help gratefully received, as ever. Cheers James -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: No View key event called back when BACK key is pressed while IME is shown?
I only discovered that thread this morning. I tried many different ways of 'catching' the IME show/hide, and that is, as Dianne says. the only way of doing it. Not only is there the issue of the BACK key, but there's the Sense UI (as the OP in the link I posted stated) with it's additional 'hide keyboard' IME key. So, I've just implemented the suggested method (onSizeChanged()) and it, unsurprisingly, works a treat! On Mar 11, 4:27 pm, Sean Hodges seanhodge...@googlemail.com wrote: And is that the approach you are planning to go for? On Thu, Mar 11, 2010 at 3:38 PM, jamesc jame...@gmail.com wrote: It appears (the endBatchEdit() didn't work out) that the correct way has been stated before by Dianne: http://groups.google.com/group/android-developers/browse_thread/threa... On Mar 11, 3:14 pm, Sean Hodges seanhodge...@googlemail.com wrote: I believe the back button event is intercepted by the keyboard app, so it knows to hide. Once focus is returned to your app, the event has already been processed. I'm not aware of any way to intercept the events of another app (like the soft keyboard). You could write your own keyboard app that passes the back button event as an intent, but I imagine that's not the solution you are looking for. If the endBatchEdit() method is working for you, I would stick with it. Alternatively, you might want to re-think your approach to this problem, as there are lots of soft keyboard apps out there and there is a chance they won't all play nice with your custom integration... On Thu, Mar 11, 2010 at 11:01 AM, mariush mariusz...@gmail.com wrote: Did you solve this? Anyone knows solution to this problem? On 8 Lut, 19:35, jamesc jame...@gmail.com wrote: If theBACKbutton is pressed when the soft keyboard is being displayed, noBACKkeycode event is generated (when it's not shown, andBACKis pressed, then my View's onKeyDown()/onKeyUp() methods get calledback). Is this expected behaviour? I'm trying to catch when the IME is hidden uponBACKbeing pressed. I'm currently working around this in the endBatchEdit() method (I'm implementing BaseInputConnection). Any help gratefully received, as ever. Cheers James -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en