Android:imeoptions Property
Talk about personal understanding, set the display of the next/complete button in the software disk, if you need to listen to the button event in the software disk, you need to implement Setoneditoractionlistener
In fact, commonly used words, is the font display next, complete or send, search ... The specific values are
Normal Actiongo actionsearch actionsend actiondone actionprevious flagnofullscreen Flagnavigateprevious corresponds Flagnavigatenext
Not finished, this looks like still no effect, right, need to add
Android:inputtype= "Text"
Android:singleline= "true"
That's it.
You can listen for events in the keypad by using the following code
Edittext.setoneditoractionlistener (new Textview.oneditoractionlistener () { @Override Public Boolean int ActionId, KeyEvent event) { Toast.maketext (mainactivity). this, "sending", Toast.length_short). Show (); return true ; } });
(tested)
Reference articles
http://liliang1222.iteye.com/blog/1130062
http://blog.csdn.net/lastdream/article/details/24365633
Learn, save experience ing
Android Partial Attribute Learning