android键盘中的enter键是可以用editText的android:imeOptions标签变化的。其属性值和对应的图标如下:
(1)actionUnspecified 未指定,对应常量EditorInfo.IME_ACTION_UNSPECIFIED.效果:
![](http://dl.javaeye.com/upload/attachment/355737/bd9d7b7c-2a93-37b3-afd9-cda2f3593058.png)
(2)actionNone 没有动作,对应常量EditorInfo.IME_ACTION_NONE 效果:
![](http://dl.javaeye.com/upload/attachment/355737/bd9d7b7c-2a93-37b3-afd9-cda2f3593058.png)
(3)actionGo 去往,对应常量EditorInfo.IME_ACTION_GO 效果:
![](http://dl.javaeye.com/upload/attachment/355757/a8db4447-ec91-39aa-a546-c117db16cf55.png)
(4)actionSearch 搜索,对应常量EditorInfo.IME_ACTION_SEARCH 效果:
![](http://dl.javaeye.com/upload/attachment/355769/c35d6b78-d5b9-314a-9698-144bc12d0af3.png)
(5)actionSend 发送,对应常量EditorInfo.IME_ACTION_SEND 效果:
![](http://dl.javaeye.com/upload/attachment/355788/c168252f-bb3d-3831-8e3c-8bced16b12a1.png)
(6)actionNext 下一个,对应常量EditorInfo.IME_ACTION_NEXT 效果:
![](http://dl.javaeye.com/upload/attachment/355798/aa6bd8b1-8ab3-38d9-b162-01ce10f4f998.png)
(7)actionDone 完成,对应常量EditorInfo.IME_ACTION_DONE 效果:
![](http://dl.javaeye.com/upload/attachment/355804/79979746-7373-3377-bb7e-3dd4bdede464.png)
注意:仅仅设置这一个属性,Enter按钮还是不能改变的,还必须增加了一个属性android:inputType="text"将键盘设置为文字输入布局,
这时键盘中Enter按钮才会按android:imeOptions的指示出现。