本文介绍了软键盘使Cordova视图缩小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在由cordova驱动的应用程序中,我禁用了缩放功能.尽管在带有输入字段的页面上,但如果显示软键盘,则视图会自动缩放以包括整个页面:
In my cordova-powered app I disabled the zoom. Though on a page with an input field, if the soft-keyboard shows-up, the view gets automatically zoomed to include the whole page:
当软键盘消失时,页面保持放大状态.
when the soft-keyboard disappears, the page remains zoomed.
如何摆脱这种变焦?我看了softkeyboard plugin
,但没有给我任何提示...
How to get rid of this zooming? I took a look at softkeyboard plugin
but it didn't give me any hints...
推荐答案
我自己找到了答案.我必须添加windowSoftInputMode
属性以使其起作用:
found an answer myself. I had to add the windowSoftInputMode
attribute to make it work:
<activity
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale"
....
android:windowSoftInputMode="adjustNothing" >
这篇关于软键盘使Cordova视图缩小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!