方向上的变化引起的问题键盘 [英] Keyboard issues arising on orientation change

查看:98
本文介绍了方向上的变化引起的问题键盘的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用我使用各种编辑文本和文本视图和列表视图。
现在我的问题是我的键盘再次出现在方向更改。理想的情况是,当用户最大限度地减少键盘,它应该在最小化状态时,装置倾斜。但它再次出现。我们如何处理这种情况。

In my app I am using various edit text and text view and list view. Now my problem is my keyboard appears again on orientation change. Ideally when user minimize the keyboard, it should be in minimized state when device is tilted. But it reappears. How do we handle this situation.

我的另一个问题是我的编辑文字之一,是一些在屏幕的到底是什么。当键盘出现时,它隐藏了编辑文本。所以用户无法看到他打字。什么是处理这个问题的理想方式。
谢谢。

My other problem is one of my edit text is some what at the end of screen. When keyboard appears, it hides the edit text. so user is not able to see what he is typing. What is the ideal way to handle this. thanks.

推荐答案

解决所有问题是这一行的android:windowSoftInputMode =stateUnchanged | adjustResize

Solution to all problem is this line android:windowSoftInputMode="stateUnchanged|adjustResize"

stateUnchanged会让键盘相同的状态,因为它是在以前的状态。隐藏或可见。

"stateUnchanged" will make the state of keyboard same as it was in earlier state. Either hidden or visible.

adjustResize会让你的编辑文本可见。

"adjustResize" will make your edit text visible.

希望这有助于。!

修改

在Android清单文件中加入了这一需求。

This need to be added in android manifest file.

这篇关于方向上的变化引起的问题键盘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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