我已经注意到了 Android Market的应用程序
,当你点击了搜索按钮,它显示了键盘,但是当你点击返回
按钮,搜索的EditText
成为无形和键盘
是隐藏的,是我不能隐藏的问题在的EditText
后后pressing返回键的键盘被隐藏,因为我无法找到一个侦听器隐藏键盘事件。
我发现这个样本Howto捕捉虚拟键盘显示/隐藏事件的Android?
但它不工作的软键盘上
I've noticed the Android Market Application
, when you click over search button it shows the keyboard, but when you click the back
button, the search EditText
become invisible and the keyboard
is hidden, the problem that I cant hide the EditText
after the keyboard is hidden after pressing the back key, because i cant find a listener for hiding the keyboard event.
I found this sample Howto capture the 'virtual keyboard show/hide' event in Android?
but it doesnt work on soft keyboard
您需要实现这个捕捉BACK按钮之前被分派到IME:
You need to implement this to capture the BACK button before it is dispatched to the IME:
http://developer.android.com/reference/android/view/View.html#onKey$p$pIme(int, android.view.KeyEvent)
上一篇:保持一个GPS服务活着,并优化电池寿命寿命、电池、GPS
下一篇:如何正确处理一个ListView里面的Android的EditText输入?正确处理、里面、ListView、EditText