Android的在对话框[ENTER]多行的EditText的 - 键作用 [英] Android [ENTER]-key action of a multiline edittext in a dialog
本文介绍了Android的在对话框[ENTER]多行的EditText的 - 键作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经创建一个多行的EditText字段的对话框。问题是,软键盘的[设置] - 键被关闭键盘而不是创建一个新的行。随着imeOptions,它可以配置很多,但没有一个换行符命令如何能我做到这一点?
I've create a dialog with a multiline edittext-field. The problem is that the [ENTER]-key of the soft keyboard is closing the keyboard instead of creating a new line. With imeOptions, it's possible to configure a lot, but not a newline-command... How can I accomplish this?
与Android 4.0.3建立了Galaxy Tab的2
Building for a Galaxy Tab 2 with Android 4.0.3.
推荐答案
我发现,设置在原始的EditText上的inputType下,以多行的是工作,其中正常输入类型是没有的。
I found out that setting the raw inputtype of the EditText to multiline is working where the "normal" input type isn't.
final EditText remark = new EditText(MyClass.this);
remark.setRawInputType(InputType.TYPE_TEXT_FLAG_MULTI_LINE);
这为我做。
这篇关于Android的在对话框[ENTER]多行的EditText的 - 键作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文