2014-06-24 41 views
0

问题: -我正在开发一个有2个字段的android应用程序。当专注于字段时,虚拟键盘将隐藏/重叠在这些字段上。所以从here我找到了解决方案<preference name="fullscreen" value="false" />。但它会导致显示STATUS BAR并且UI将向上推。因此,我恢复了原状。Phonegap的Android应用程序全屏键盘构建

问题: -是否有任何的jQuery补丁或PhoneGap的插件,使虚拟键盘全屏[风景和肖像模式]你可以看到下面的图片:

Full screen android keyboard

请回复尽快地!提前致谢。 问候,

回答

0

好吧,我终于解决了这个问题,下面的jQuery补丁:

//JS : OnReady event: 

var windowHeightSeventyPercent = parseInt(screen.height * 0.7); //To support multiple devices 

$("input").focusin(function(){ 
    $("body").height($("body").height()+parseInt(windowHeightSeventyPercent)); //Make page body scroll by adding height to make user to fillup field. 
}); 

$("input").focusout(function(){ 
    $("body").height($("body").height()-parseInt(windowHeightSeventyPercent)); 
}); 
相关问题