ahhh, ok, so maybe I was not totally understanding you, and now I see my text field does the same thing -- if you touch it, you get the IME, but if you click it with the trackball press, no keyboard. Although I'm not sure why a user would need to do that?
On Wed, Dec 2, 2009 at 6:35 PM, Mark Wyszomierski <[email protected]> wrote: > Hi Steve, > > Thanks for taking a look - maybe I haven't set a parameter on my edit > text then? I'm doing: > > EditText et = new EditText(context); > et.setInputType(InputType.TYPE_CLASS_TEXT); > et.setImeOptions(EditorInfo.IME_ACTION_SEARCH); > et.setOnTouchListener(...); // touch listener works perfectly. > et.setOnClickListener(new OnClickListener() { > public void onClick(View arg0) { > Log.d(TAG, "We were clicked!"); > } > }); > > so click always prints the message, it's just that the IME keyboard > doesn't come up for me when the handler is added. Take away the call > to setOnClickListener(), and the keyboard appears again. I'll try > writing another test for it, > > Thanks > > On Dec 2, 9:30 pm, Steve <[email protected]> wrote: > > 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 <[email protected]> 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 <[email protected]> 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 [email protected] > To unsubscribe from this group, send email to > [email protected]<android-developers%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- Android mobile application development http://steveoliverc.wordpress.com/ -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

