Softkeyboard in PhoneGap covers input elements

荒凉一梦 提交于 2019-12-05 19:35:52
Hari

Instead of

android:windowSoftInputMode="adjustPan" 

try

android:windowSoftInputMode="adjustResize"
android:windowSoftInputMode="adjustResize"

It works fine on my phone (4.1)

This has been a big issue for me too, on Android 2.x and early 4.x.

Correct me if I'm wrong, but I think that android:windowSoftInputMode is for native development and applies when an activity is started. Changing that setting hasn't seemed to affect my PhoneGap/Cordova projects.

When an edit field receives focus, I scroll the window into position explicitly:

onFocusEditField = function(comp, e, eopts) {
    if(Ext.os.is.Android) {
        var ost = comp.element.dom.offsetTop;
        this.getParent().getParent().getScrollable().getScroller().scrollTo(0, ost-50);
    }
};

Note: using Sencha Touch 2.x.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!