简体   繁体   English

如何在iOS和Android的Titanium Mobile中隐藏键盘上的快速建议

[英]how to hide Quick suggestions on keyboard in titanium mobile for ios and android

while typing text some space is added to keyboard and Text Suggestions are showing up i would like to disable those suggestions in my application.Please let me know how to do. 在输入文字时,会在键盘上添加一些空间,并且出现“文字建议”,我想在我的应用程序中禁用这些建议。请让我知道该怎么做。

tss code tss代码

"#emailtextfield[platform=android]":{
top: "3%",
height: "6%",
width: '70%',
paddingLeft: 5,
borderRadius: 3,
font:{
    fontSize: Alloy.Globals.smallfont
},
backgroundColor: '#000000',
opacity: '0.5',
color: '#fff',
autocorrect:false,
autocapitalization: Ti.UI.TEXT_AUTOCAPITALIZATION_NONE,
softKeyboardOnFocus: Ti.UI.Android.SOFT_KEYBOARD_SHOW_ON_FOCUS,
keyboardType: Ti.UI.KEYBOARD_EMAIL
},
"#passwordtextfield[platform=android]":{
top: "2%",
height: "6%",
width: '70%',
paddingLeft: 5,
borderRadius: 3,
autocorrect:false,
font:{
    fontSize: Alloy.Globals.smallfont
},
backgroundColor: '#000000',
opacity: '0.5',
color: '#fff',
autocapitalization: Ti.UI.TEXT_AUTOCAPITALIZATION_NONE,
softKeyboardOnFocus: Ti.UI.Android.SOFT_KEYBOARD_SHOW_ON_FOCUS,
keyboardType: Ti.UI.KEYBOARD_EMAIL
}

xml code xml代码

<TextField id="emailtextfield" hintText="Email/Username"></TextField>
<TextField id='passwordtextfield'hintText="Password"passwordMask="true"></TextField>

Looking in the documentation I see a property called autocorrect for the text field. 文档中,我看到了一个名为autocorrect的文本字段属性。 It should help you. 它应该可以帮助您。 Set it to false. 将其设置为false。

Edit: It turns out autocorrect and suggestion are two different things. 编辑:事实证明自动autocorrectsuggestion是两件事。 The suggestions can be turned off from your keyboard's settings. 可以从键盘设置中关闭建议。 On android there can be multiple keyboards so verify the one you are using. 在android上可以有多个键盘,因此请验证您使用的键盘。 Whereas autocorrect is text field property used to replace the misspelled words. 而autocorrect是用于替换拼写错误的单词的文本字段属性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM