Ok, I have been reading some android code today.
This is how far I reached:

There is an abstract class AbstractInputMethodService which extends
Service.

When a key is pressed the method:

public void dispatchKeyEvent(int seq, KeyEvent event, EventCallback
callback)

is called.


That method has the following:

boolean handled = event.dispatch(AbstractInputMethodService.this,
                    mDispatcherState, this);
if (callback != null) {
    callback.finishedEvent(seq, handled);
}


The first part will make my overridden method onKeyDown() get called
so I guess the popup is shown inside:
callback.finishedEvent()


When I debug it and I go into finishedEvent it calls finishedEvent()
from IInputMethodSessionWrapper's inner class.

    static class InputMethodEventCallbackWrapper implements
InputMethodSession.EventCallback {
        final IInputMethodCallback mCb;
        InputMethodEventCallbackWrapper(IInputMethodCallback cb) {
            mCb = cb;
        }
        public void finishedEvent(int seq, boolean handled) {
            try {
                mCb.finishedEvent(seq, handled);
            } catch (RemoteException e) {
            }
        }
    }


But I can't continue debugging inside mCb.finishedEvent() :(

Any ideas?

On Dec 15, 1:44 pm, Macarse <[email protected]> wrote:
> I am not looking how to override onKeyDown on an Activity level.
>
> I am doing an android input 
> method:http://android-developers.blogspot.com/2009/04/creating-input-method....
>
> When you use the android keyboard and you long press a hard key a
> popup will show.
>
> On Dec 15, 1:19 pm, Brill Pappin <[email protected]> wrote:
>
>
>
>
>
>
>
> > Oh of course, override it at the component level.
>
> > I'm so in the keyboard code I completely forgot about that :)
>
> > - Brill

-- 
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

Reply via email to