这是我在布局 XML 中定义的 editText:
<EditText android:id="@+id/msg_text_input"
android:text=""
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_toLeftOf="@id/msg_button_send"
android:imeOptions="actionNone"
android:inputType="text|textAutoComplete|textAutoCorrect|textShortMessage"/>
但是,在我单击 EditText 并开始键入后,不会发生自动完成和自动更正。我错过了什么?
最佳答案
我在自动更正方面遇到了一些问题,似乎 textAutoComplete 意味着输入将使用应用程序提供的可能值数组自动完成。所以它不是android内置的字典,但是例如你可以提供一个国家列表,用户可以输入前几个字母,而文本将通过匹配列表项自动完成。
尝试单独使用 textAutoCorrect,内置的 android 字典会建议可能的单词,更正拼写错误等......至少它对我有用......
关于android - EditText 自动更正和自动完成不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5427573/