我的一些表标题被选为拼写错误,并以红色下划线.当然,这不是我想看到的.我发现使用了
androID:inputType="textNoSuggestions"
会禁用拼写检查标记.我觉得奇怪(错误?)这是必要的,因为文档说:
inputType: The type of data being placed in a text fIEld,used to help
an input method decIDe how to let the user enter text.
而且没有与textVIEw相关的输入.这是避免拼写检查的唯一/更合适的方法,这是一个拼写检查非输入字段的错误吗?
更新:每个请求这是示例xml
<TextVIEw androID:text="ID#" androID:layout_wIDth="0dp" androID:layout_height="wrap_content" androID:typeface="monospace" androID:textSize="14sp" androID:digits="4" androID:textAlignment="gravity" androID:layout_weight="5" androID:gravity="left" androID:singleline="true" androID:phoneNumber="true" androID:inputType="textNoSuggestions|none"></TextVIEw>解决方法 首先,我会尝试删除androID:digits,androID:phoneNumber和androID:inputType属性.
所有这些都更适用于允许输入的字段(例如EditTexts).它也看起来你没有正确使用androID:digits属性,因为你提供的字符串定义了唯一允许的字符.
从本质上讲,这种属性组合告诉AndroID你的TextVIEw接受的输入形式只包含数字4的电话号码,这个TextVIEw不接受任何类型的输入,AndroID不应该提供拼写检查建议.
如果您自己设置TextVIEw的内容,实际上没有理由尝试使用诸如androID:phoneNumber之类的标志来限制TextVIEw的内容,因为您是控制它的人.
总结以上是内存溢出为你收集整理的android – 禁用textView上的“拼写检查”全部内容,希望文章能够帮你解决android – 禁用textView上的“拼写检查”所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)