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

Reply via email to