[英]Android Ionic keyboard Scroll issue
I am using ionic 1.4.2 to develop an app on android. 我正在使用ionic 1.4.2在Android上开发应用程序。 And the ionic keyboard plugin is used.
和离子键盘插件被使用。
I met with this issue: in a login page, if the input is clicked(focused), the form will not be scrolled to the center, however if I type the keyboard to input a character, the form will be scrolled to the center. 我遇到了这个问题:在登录页面中,如果单击(突出显示)输入,表单将不会滚动到中心,但是,如果我键入键盘来输入字符,表单就会被滚动到中心。
On iOS, no such issue. 在iOS上,没有此类问题。
<ion-content scroll="true" overflow-scroll="false" class="loginDiv" ng-show="loginViewVisible">
<form></form>
</ion-content>
<ion-content>other elements</ion-content>
Please try adding below lines of code in your config file. 请尝试在配置文件中添加以下代码行。
<preference name="android-windowSoftInputMode" value="adjustResize" />
<preference name="fullscreen" value="false" />
Config file can be found as android xml path: app/platforms/android/res/xml/config.xml 可以找到配置文件作为android xml路径:app / platforms / android / res / xml / config.xml
And further more please check you app.js file for keyboard plug in if they are set as mention below or not 此外,请检查app.js文件是否有键盘插入(如果未按如下所述设置)
if (window.cordova && window.cordova.plugins && window.cordova.plugins.Keyboard) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
cordova.plugins.Keyboard.disableScroll(true);
}
Hope it will help. 希望它会有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.