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. special toggle button...

if i want a toggle button that looks like this:

|    On    |           |

|            |   Off    |

where the empty space goes from right to left (and vice versa) when
you click on it -- revealing some text, what's the easiest way to do
that?  I imagine I could do it with a LinearLayout and a bunch of
ImageView objects and handle the image in code, but that just seems
really gross....

a variation on this would be like this:
|    On    |   Off    |

and a different background image on the one that's selected.


(I bet this does not come out aligned and the ascii-art images look
awful -- must be a wysiwyg way to do this...)

2. Linking Directly To An App In The Market?

Is there any way to link directly to an application in the
Marketplace? You know, so you could use something like AdMob to launch
the Marketplace and bring users to your app. Or to launch the
Marketplace from a URL or something.

Been trying to figure out how to do this. Anyone sniff any G1 traffic


3. Ratings and playlists?

4. undefined reference to `semop`

5. Adding Resource in framework

6. Simple Animation Code

7. inconsistent results from DateUtils.getRelativeTimeSpanString