Have a look at View.onKeyUp() or View.onKeyDown() to handle to keypresses. As for the IME, take a look at this recent post:
http://groups.google.com/group/android-developers/browse_thread/thread/22674208e500cdf0 On Jun 28, 8:23 am, skooter500 <[email protected]> wrote: > Hi > > I have a TextView and a search button on an activity. When I press the > enter key, I want to do something and then dismiss the soft keyboard > programatically. I have set the TextView to be single line by using: > > android:singleLine="true", which moves the focus to the next component > when you press the enter key > > 1. How do I trap the enter key? A TextWatcher? An OnKeyListener? > > 2. How do I dismiss the soft keyboard programatically? > > Thanks! > > Bryan -- 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

