键盘显示乱七八糟的元素的位置 [英] Keyboard Showed messed up elements' position

查看:194
本文介绍了键盘显示乱七八糟的元素的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有游戏需要移动的触摸键盘的输入。它的显示有问题,每当键盘显示在文本输入焦点,我的所有元素哪个位置:绝对得到所有混乱。



有一个插件,使移动键盘总是显示,所以我重新定位所有的元素,或者我需要改变CSS来使元素,使



这是下列其中一个:

元素css:

  #mixer {
position:absolute;
bottom:29%;
left:25%;
width:234px;
height:210px;
background:transparent url(img / mixer.png)0 50px no-repeat;
}



注意:我在Android环境中使用Jquery mobile,phonegap。

解决方案

在您的AndroidManifest.xml中,使用键盘在活动下添加以下行:



code> android:windowSoftInputMode =adjustNothing


I have game which require the input of touch keyboard of the mobile. Its display has problem, whenever the keyboard shows up at the text input focus, all my element which position: absolute gets all messed up.

Is there a plugin that enables mobile keyboard to always show up so that I re-position all the elements OR I need to alter the css to make the elements so that the do not mess up when the keyboard shows up?

How should I implement this?

This is one of the element css:

#mixer{  
    position: absolute;  
    bottom:29%;
    left:25%;
    width: 234px;  
    height: 210px;  
    background: transparent url(img/mixer.png) 0 50px no-repeat;  
} 

Note: I am using Jquery mobile, phonegap on Android environment.

解决方案

In your AndroidManifest.xml, add the following line under the activity with the keyboard:

android:windowSoftInputMode="adjustNothing"

这篇关于键盘显示乱七八糟的元素的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆