【问题标题】:android 2 spaces replaced by commaandroid 2个空格被逗号替换
【发布时间】:2016-04-12 08:01:35
【问题描述】:

我有一个 EditText,其最大允许字符数设置为 2。如果此 EditText 中有两个字符并且用户按两次空格,则第二个字符将替换为逗号'。'

我已尝试关闭自动更正,而 EditText 的输入类型为“textNoSuggestions”

如何关闭此功能?

<EditText
    android:maxLength="2"
    android:inputType="textCapSentences|textNoSuggestions"
/>

【问题讨论】:

  • 你的代码在哪里??

标签: android android-edittext autocorrect


【解决方案1】:

这是键盘的设置,而不是您的应用。你可以在下面找到它

设置 > 语言和输入法 > 键盘和输入法 >(您的 键盘)

据我所知,它不能被禁用。您最好的选择可能是查看输入法样式https://developer.android.com/training/keyboard-input/style.html

参考:Android: edittext - typing two spaces after a letter replaces the first space with a period

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-01-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-02-06
    相关资源
    最近更新 更多