Android虚拟键盘弹出时挡住EditText解决方法
2012-03-28 00:00
295 查看
在manifest的activity节点使用 Xml代码
<activity android:windowSoftInputMode="adjustResize"/>
android:windowSoftInputMode的使用。
activity如何与软键盘交互。这个属性的设置将会影响两件事情:
1> 软键盘的状态——是否它是隐藏或显示——当活动(Activity)成为用户关注的焦点。
2> 活动的主窗口调整——是否减少活动主窗口大小以便腾出空间放软键盘或是否当活动窗口的部分被软键盘覆盖时它的内容的当前焦点是可见的。
要默认隐藏输入法
<activity
android:name="ViewActivity"
android:label="@string/app_name"
android:windowSoftInputMode="adjustUnspecified|stateHidden"
android:configChanges="orientation|keyboardHidden">
</activity>
果要默认显示输入法
2:
有些手机可能用上诉方法无法奏效,那可以用以下方法:
在EditText的布局文件里添加ScrollView,当点击EditText时控件会滑动,当失去焦点时滚动条会隐藏。
$(document).ready(function(){dp.SyntaxHighlighter.HighlightAll('code');});
原文链接:
http://blog.csdn.net/hopezhangbo/article/details/7384026
<activity android:windowSoftInputMode="adjustResize"/>
android:windowSoftInputMode的使用。
activity如何与软键盘交互。这个属性的设置将会影响两件事情:
1> 软键盘的状态——是否它是隐藏或显示——当活动(Activity)成为用户关注的焦点。
[align=center][/align] |
要默认隐藏输入法
<activity
android:name="ViewActivity"
android:label="@string/app_name"
android:windowSoftInputMode="adjustUnspecified|stateHidden"
android:configChanges="orientation|keyboardHidden">
</activity>
果要默认显示输入法
<activity android:name="ViewActivity" android:label="@string/app_name" android:windowSoftInputMode="stateVisible " android:configChanges="orientation|keyboardHidden"> </activity> |
有些手机可能用上诉方法无法奏效,那可以用以下方法:
在EditText的布局文件里添加ScrollView,当点击EditText时控件会滑动,当失去焦点时滚动条会隐藏。
$(document).ready(function(){dp.SyntaxHighlighter.HighlightAll('code');});
原文链接:
http://blog.csdn.net/hopezhangbo/article/details/7384026
相关文章推荐
- Android虚拟键盘弹出时挡住EditText解决方法——转
- Android虚拟键盘弹出时挡住EditText解决方法
- 移动H5页面,Android手机下,input获取焦点弹出系统虚拟键盘时,挡住input解决方法
- android虚拟键盘弹出遮挡登陆按钮问题的解决方法
- android 自定义弹出框被系统底部虚拟键盘挡住、Pad上点击空白区域弹出框不dismiss BUG解决
- android虚拟键盘弹出时挡住EditText的解决方案
- 解决android软键盘弹出有时会遮住EditText输入框的一种方法
- iOS 上常用的两个功能:点击屏幕和return退出隐藏键盘和解决虚拟键盘挡住UITextField的方法
- Android软键盘弹出时把布局顶上去的解决方法
- Android输入法弹出时把布局顶上去和登录按钮顶上去的解决方法
- Android开发 activity里面的WebView加载js调用windows.location.reload()会弹出浏览器的解决方法
- textField被虚拟键盘挡住的3种解决方法
- Android软键盘弹出时把布局顶上去的解决方法
- Android软键盘弹出遮挡EidtText的解决方法
- android开发之edittext弹出输入框遮挡住文字。解决方法
- 关于ionic中popup在Android中多次按返回键弹出多次的解决方法
- Android软键盘弹出时把布局控件顶上去的解决方法
- iOS 虚拟键盘挡住UITextField的解决方法
- Android 禁止editText弹出软键盘(带光标) 并解决其他editText弹出软键盘后 切换回来 小键盘隐藏
- Android虚拟键盘挡住输入框的处理方法