是否有可能设置 android:inputType="textMultiLine"
和 android:imeOptions="actionDone"
的 EditText
小部件同时?
我想要一个多行编辑框,键盘上的操作按钮是 Done,而不是 Enter(回车),但它似乎不起作用。
最佳答案
使用
editText.setImeOptions(EditorInfo.IME_ACTION_DONE);
editText.setRawInputType(InputType.TYPE_CLASS_TEXT);
在 XML 中:
android:inputType="textMultiLine"
https://stackoverflow.com/questions/2986387/