简体   繁体   English

如何设置设置Android键盘以在Mobile Hybrid应用中大写字母

[英]How to set set Android keyboard to capitalize first letter in Mobile Hybrid app

I am working on a hybrid app and having a problem while testing in Android (4.4). 我正在开发混合应用程序,并且在Android(4.4)中进行测试时遇到问题。 I am using Ionic (AngularJS+Cordova). 我正在使用Ionic(AngularJS + Cordova)。

I have searched high and low for the answer to this problem to no avail. 我一直在高空搜寻这个问题的答案,但无济于事。 I am trying to make it so that when a text box has focus the mobile keyboard is set to capitalize the first letter. 我正在尝试使文本框具有焦点时,将移动键盘设置为首字母大写。 I DO NOT want it to only appear capitalized (text-transform), but actually have a capitalized value, but only if the user wants that. 我不希望它仅显示为大写(文本转换),但实际上具有大写的值,但前提是用户需要。

It's almost like I want the shift key to get pressed automatically whenever a text input gets focus. 几乎就像我希望每当文本输入获得焦点时自动按下Shift键。

The best solution I could come up with was to use a text-area input styles to look like a regular text-input. 我能想到的最好的解决方案是使用文本区域输入样式,使其看起来像常规的文本输入。 Android wants to capitalize text-areas automatically so this works.. even though it's a bit hacky. Android希望自动将文本区域转换为大写字母,这样就可以正常工作..即使它有点笨拙。

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

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