android - 在 Android 中一起使用 textAutoCorrect 和 textAutoComplete

标签 android android-layout autocomplete android-edittext

我试图创建一个 EditText android:inputType="textMultiLine|textAutoCorrect|textCapSentences|textAutoComplete"

不幸的是,Android 不允许我同时使用 textAutoCorrecttextAutoCompletetextAutoCorrect 让我能够在输入时选择多个选项(用于拼写检查),textAutoComplete 让我可以添加为单个单词提供自定义完成选项的下拉列表。

但是,当两者都添加时,textAutoComplete 似乎优先。由于这是一个多行编辑文本,我希望能够提供拼写检查和自定义选项。我认为这是可能的,因为 Google+ 的 Composer 允许拼写检查,但它也让我提到用户(这将是自定义选择)。 MultiAutoCompleteTextViews 将 textAutoComplete inputType 添加到 View ,所以我也不能使用它们。

谁能帮我想出解决问题的方法?

最佳答案

查看文档我会说这是不可能的。

textAutoCorrect     0x00008001   Can be combined with text and its variations to request auto-correction of text being input. Corresponds to TYPE_TEXT_FLAG_AUTO_CORRECT.
textAutoComplete    0x00010001   Can be combined with text and its variations to specify that this field will be doing its own auto-completion and talking with the input method appropriately. Corresponds to TYPE_TEXT_FLAG_AUTO_COMPLETE.

您可以在这里阅读更多相关信息: http://developer.android.com/reference/android/widget/TextView.html#attr_android:inputType

关于android - 在 Android 中一起使用 textAutoCorrect 和 textAutoComplete,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13831955/

相关文章:

android - 抽屉布局菜单额外图标从 xml 添加标题右侧

android - ConfigurationsContainer 在多项目设置中为空

android - 无法在一个项目上没有错误消息的情况下重命名应用程序包

android - 如何使 LinearLayouts 可点击

javascript - Eclipse JavaScript 自动完成

angularjs - Google 使用 Angular JS 放置自动完成功能

android - 语音识别应用程序未返回 Android 中的确切单词

android - 从 JSON 显示布局中的单个对象

android - 如何在android中的状态栏上显示倒数计时器,如时间显示?

javascript - 焦点事件 jquery 组合框/自动完成