android - EditText 自动更正和自动完成不起作用

标签 android

这是我在布局 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/

相关文章:

Android Fragment(与 2.3.3 上的兼容包)创建 "Specified child already has a parent error"

android - 程序类型已经存在 : com. android.internal.http.multipart.ByteArrayPartSource

android - 在 Application 类中获取 sharedPreferences 时的 NullPointer

java - 通过 FragmentPagerAdapter 将数据从 Activity 传递到 ViewPager 的 Fragment

Android onOptionsItemSelected

java - 如何通过Android提取表数据

java - 更改 listView 中特定行项目的布局

java - 谷歌地图 : Multiple values in snippet

java - 以编程方式设置 Wifi 代理凭据

android - 如何解决 Java Eclipse 中的 "The hierarchy of the type is inconsistent"错误?