gpt4 book ai didi

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

转载 作者:太空狗 更新时间:2023-10-29 15:14:29 25 4
gpt4 key购买 nike

我试图创建一个 EditTextandroid: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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com