当我在Android中点击edittextview键盘没有显示? [英] Keyboard not shown when i click on edittextview in android?

查看:387
本文介绍了当我在Android中点击edittextview键盘没有显示?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我点击然后一些时间键盘显示或有时键盘都没有显示edittextview。

When i click on the edittextview then some times keyboard shown or some times keyboard are not shown.

在Android 2.1的显示它的键盘时,我点击edittextview

In android 2.1 it show the keyboard when i click on the edittextview

但是当我开始在Android 2.2同样的应用它,然后它不会显示键盘。

but when i start same application it on android 2.2 then it not show the keyboard.

帮助我如何证明这个问题。

Help me how to show that problem.

推荐答案

确定,这可能是一个迟到的反应,但它的工作。

OK, This might be a late response, but it worked.

我见过在Android 2.1和2.3.x这一问题(而不是其他版本的软件开发工具包的测试)。

I have met this problem on android 2.1 and 2.3.x(not tested on other versions of SDKs).

我注意到一个奇怪的事情,当我点击的EditText无法打开键盘,我pressed BACK按钮来显示一个警告对话框,然后我取消(关闭)它,然后再次点击的EditText,现在键盘被带到生活了。

I noticed a strange thing that when my click on the EditText was unable to open the keyboard, I pressed the BACK button to show an alert dialog and then I canceled(closed) it, and clicked the EditText again, now the keyboard was brought to life again.

这是我可以得出这样的结论键盘将始终显示为的EditText如果EditText上没有的 previously 自己的焦点(显示在EditText上查看警报对话框将使的EditText失去焦点)。

From that I can conclude that the keyboard will always show for the EditText if the EditText does not previously own focus(showing an alert dialog over the EditText view will make the EditText to lose focus).

所以调用下面的函数在您的EditText当它被带到面前:

so call the function below on your EditText when it is brought to front:

mEditText.clearFocus();

parentViewThatContainsEditTextView.clearFocus();

这篇关于当我在Android中点击edittextview键盘没有显示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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