Android的屏幕上的键盘自动弹出 [英] Android on-screen keyboard auto popping up
问题描述
我的一个应用程序已经有一个开屏(基本菜单)的的EditText
随后几个按钮
秒。问题是,我的几位用户也报告说,当他们打开应用程序它会自动弹出屏幕上的键盘没有他们甚至触及的EditText
。据我所知,所有这些用户都使用 HTC Hero的。
这是在1.5中的错误?有什么我可以做些什么?
您可以用code以下行活动的onCreate方法,以确保当用户点击键盘时,只弹出到一个EditText
<$p$p><$c$c>this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);One of my apps has an "opening screen" (basically a menu) that has an EditText
followed by several Button
s. The problem is that several of my users are reporting that when they open the app it's automatically popping up the on-screen keyboard without them even touching the EditText
. As far as I can tell, all of these users are using the HTC Hero.
Is this a bug in 1.5? Is there anything I can do about it?
You can use the following line of code in the activity's onCreate method to make sure the keyboard only pops up when a user clicks into an EditText
this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
这篇关于Android的屏幕上的键盘自动弹出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!