Ho to deteck key press on soft keyboard

186 views
Skip to first unread message

Yossi

unread,
May 1, 2009, 11:27:24 AM5/1/09
to Android Developers
Hi,

I have an EditText control on a preference screen and I run some logic
when the user enters a character. I've been using View.OnKeyListener
but it does not work with the soft (virtual) keyboard (V1.5).
What should I use instead?

Thanks,
Yossi

Dianne Hackborn

unread,
May 1, 2009, 5:44:51 PM5/1/09
to android-d...@googlegroups.com
The InputConnection interface is the API the IME has to your text editor.  TextView provides a default implementation, returned by View.onCreateInputConnection.
--
Dianne Hackborn
Android framework engineer
hac...@android.com

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.

Yossi

unread,
May 2, 2009, 4:47:12 AM5/2/09
to Android Developers
It seems this API is available only for 1.5 and I need the same code
to run also for 1.1
So I assume there is no backwards compatible API. correct?

Thanks,
Yossi

On May 2, 12:44 am, Dianne Hackborn <hack...@android.com> wrote:
> The InputConnection interface is the API the IME has to your text editor.
> TextView provides a default implementation, returned by
> View.onCreateInputConnection.
>
> On Fri, May 1, 2009 at 8:27 AM, Yossi <yossi....@gmail.com> wrote:
>
> > Hi,
>
> > I have an EditText control on a preference screen and I run some logic
> > when the user enters a character. I've been using View.OnKeyListener
> > but it does not work with the soft (virtual) keyboard (V1.5).
> > What should I use instead?
>
> > Thanks,
> > Yossi
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com

Dianne Hackborn

unread,
May 11, 2009, 9:51:12 PM5/11/09
to android-d...@googlegroups.com
Um, no.  This is one of the major new features that was introduced in 1.5.
hac...@android.com
Reply all
Reply to author
Forward
0 new messages