Is your keyboard event handle, "onKeyDown(...) method, returning the
correct values when they process a specific key ?
Do you call the super.onKeyDown(...)  and return it's result, when you
don't process a key that you don't recognize ?

Does commenting the onKeyDown(...) method make the EditText Control,
work correctly again ?

Maybe you are just forgetting to call the following on your view:

        setFocusable( true ); // Make sure we get keys


NOTE: without Focus you don't receive any keyboard input !



On 26 mar, 18:26, Cheryl Sedota <[EMAIL PROTECTED]> wrote:
> I am developing an on-screen keyboard activity and need to post a key
> event to Android.  I can't figure out how to do it.
>
> I've intercepted some key events to see what Android methods are on
> the stack, and it seems that I need to call getParent() from my view
> until I get to the view root (android.view.ViewRoot, which is not an
> accessible class in Android application code) and then call this
> method:
>
>    public void dispatchKey(KeyEvent event)
>
> ... I tried calling that method on my view root object using java
> reflection and passed the key event object that I created.  That call
> was successful but no new text shows up in my EditText control which
> is located within the keyboard activity.
>
> My first goal is for the EditText control that is located within the
> keyboard activity (which maintains focus even while the key image is
> pressed) to show the text that I have entered using the keyboard.
>
> My second goal is for an EditText control that is in the Activity
> behind my keyboard activity to show the text that I have entered using
> the keyboard.
>
> I appreciate any help anyone can provide!!
> Cheryl
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to