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 <[email protected]> wrote: > And is that the approach you are planning to go for? > > On Thu, Mar 11, 2010 at 3:38 PM, jamesc <[email protected]> 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 <[email protected]> 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 <[email protected]> wrote: > >> > Did you solve this? > >> > Anyone knows solution to this problem? > > >> > On 8 Lut, 19:35, jamesc <[email protected]> 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 [email protected] > >> > To unsubscribe from this group, send email to > >> > [email protected] > >> > 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 [email protected] > > To unsubscribe from this group, send email to > > [email protected] > > 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

