软键盘重叠带的EditText场 [英] Soft Keyboard Overlapping with EditText Field

查看:128
本文介绍了软键盘重叠带的EditText场的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现<一href="http://stackoverflow.com/questions/1925428/android-when-the-keyboard-pops-up-the-layout-is-invisible-how-do-i-solve-this">this旧帖子这无疑有助于我的问题,但我注意到,它并没有真正似乎解决我的问题。我已经收集了我需要设置的android:我的活动windowSoftInputMode =adjustPan。但问题是,它根本不泛不够。

I found this old post which definitely helps with my problem, but I'm noticing that it doesn't really seem to solve my problem. I have gathered that I need to set android:windowSoftInputMode="adjustPan" for my activity. But the issue is that it simply doesn't pan ENOUGH.

的文本字段是朝着视图的底部,而当键盘显示了,该视图转移略微但只有的EditText的最顶端。该文本字段自动完成开启,当它开始显示自动完成选项,认为平底锅略有下降较多,但实际上卷起甚至被自动完成选项的进一步模糊。它使文本输入字段非常难用,因为你什么都看不到你输入。

The text field is toward the bottom of the view, and when the keyboard shows up, the view shifts slightly but only the very top of the EditText. The text field has autocomplete turned on, and when it begins to show autocomplete options, the view pans down slightly more, but actually winds up even further obscured by the autocomplete options. It makes the text input field very difficult to use since you can't see anything you're typing.

这是一个多行输入框,当文本滚动到下一行,认为平底锅更远,所以你可以看到文本的previous线(S)。但你不能看到你输入的内容,我认为这是pretty的重要。

It is a multiline input field, and when text rolls to the next line, the view pans farther, so you can actually see the previous line(s) of text. But you cannot see what you're typing, which I think is pretty important.

没有人有任何想法解决这个问题?

Does anyone have any thoughts on solving this issue?

推荐答案

所以,我发现这似乎是这个问题的原因。在我的Andr​​oidManifest.xml我已成立

So, I've found what appears to be the cause of the issue. In my AndroidManifest.xml I had set

<uses-sdk android:minSdkVersion="3" />

显然,使用下面的4的minSdkVersion一个是在问题的根源。它改变为4时,布局表现为它应该有和的EditText有其以上软键盘适当的顶部第一行

Apparently, using a minSdkVersion below "4" was at the root of the problem. On changing it to "4", the layout appeared as it should have, and the EditText had its first line above the top of the soft keyboard appropriately.

感谢您的帮助,火卫一。

Thanks for the help, Phobos.

这篇关于软键盘重叠带的EditText场的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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