I just dug into an edit text I was working on a while back, and I see
I used setOnKeyListener and setOnTouchListener in addition to
setOnClickListener.  Not 100% that I remember why I had to do that :)
but in any case the soft keyboard will open when you click or touch
the edit text, and also you can track all of its keystrokes.  And I
can track when the edit text is clicked.

On Dec 2, 11:46 am, Mark Wyszomierski <mar...@gmail.com> wrote:
> Still stuck on this, if anyone has a suggested work around - I
> basically just want to know when an EditText is clicked, but also make
> sure the IME keypad is displayed when clicked (the OnClickListener
> seems to block that default behavior).
>
> I tried to check if the keypad is visible/active with the following,
> but it always reports true, however I can't see it on screen:
>
>   InputMethodManager imm = (InputMethodManager)getContext
> ().getSystemService(Context.INPUT_METHOD_SERVICE);
>   if (imm.isActive() == false) {
>       Log.d(TAG, "key pad is not active.");
>   }
>
> is there another way to check if the keypad is really visible?
>
> Thanks
>
> On Nov 30, 1:35 am, Mark Wyszomierski <mar...@gmail.com> wrote:
>
>
>
> > Hi,
>
> > I have an EditText. If I set an OnClickListener for it, theimekeypad
> > doesn't appear when I click it (using the trackball on the G1):
>
> >   EditText edit = new EditText(context);
> >   edit.setOnClickListener(new OnClickListener() {
> >       public void onClick(View v) {
> >           //imekeypad won't appear when this is set and clicked.
> >       }
> >   });
>
> > if I don't set the click listener, the keypad will appear when
> > clicked. Is this expected behavior, or am I doing something wrong?
>
> > Thanks

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to