a completely hacked solution (in the absence of anything better) --

@Override
public boolean onKeyUp(int keyCode, KeyEvent keyEvent) {
    boolean rc = super.onKeyUp(keyCode, keyEvent);

    View view = getCurrentFocus();
    if (view instanceof EditText) {
        return rc;
    }
    ...
    // handle key up events when focus is not in an edit text box.
    ...
}

On Dec 17, 8:39 am, sdphil <[email protected]> wrote:
> according to the documentation --
>
> http://developer.android.com/reference/android/app/Activity.html#onKe...
>
> "Called when a key was released and not handled by any of the views
> inside of the activity. So, for example, key presses while the cursor
> is inside a TextView will not trigger the event (unless it is a
> navigation to another object) because TextView handles its own key
> presses."
>
> My activity's onKeyUp should not be getting called when the cursor is
> inside a TextView.  This is the behavior I see in Android 1.5 and 1.6,
> but in 2.0 my activity's onKeyUp is still getting called when the
> cursor is inside a TextView -- am I mis-interpreting this?
>
> tia.

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