onKeyUp in 2.0 gets called even when focus is in a TextView

by sdphil » Fri, 18 Dec 2009 00:39:16 GMT

Sponsored Links
 according to the documentation --

 http://developer.android.com/reference/android/app/Activity.html #onKeyUp%28int,%20android.view.KeyEvent%29

"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

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?



Other Threads

1. things turning on in the night


I am using a HTC Magic and recently various programs are turning on
and using all my battery power. I recharged my phone for 8pm last
night and woke up to a phone with no power at 5AM plugged in and loads
of stuff I rarely use was on ( I do have a task kill program which I
use before bed).

What else can I do ?

2. why MotionEvent.ACTION_DOWN doesn't fire in onTouchEvent?

It certainly does.  Are you sure you are actually touching within that view?

Dianne Hackborn
Android framework engineer

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.


3. **never ever** use Toasts with Activity context

4. Android Maket Place Apps

5. Android Market :: Free application gets to top of pile on new release, paid app doesn't?

6. Getting the email address of the Google Account tied to the handset

7. Application gets killed due to a timeout