问题描述
您好我裹的EditText控件拖到即在用户的请求被显示在屏幕上的控制。它覆盖了整个屏幕,直到键盘上的用户presses完成按钮。
Hi I wrapped edittext control onto a control that is being displayed on the screen at users request. It overlays the whole screen until user presses 'done' button on the keyboard.
我不能够明确地显示在屏幕上的控制。只有当用户点击进入控制才把它显示。我失去了一些东西?
I am not able to explicitly show the control on the screen. only when user taps into control only then its shown. Am I missing something?
我甚至尝试这一点,它不布林它,当我启动覆盖了编辑文本存在的:
I even try this and it does not brin it up when I launch the overlay that Edit Text exists on:
customCOntrol.showKeyboard();
public void showKeyboard()
{
InputMethodManager imm = (InputMethodManager)_context.getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(this._textView.getWindowToken(), InputMethodManager.SHOW_IMPLICIT);
}
这里是settig我有屏幕本身在配置文件中的android上:windowSoftInputMode =stateHidden | adjustPan
here is the settig I have on the screen itself in the config file android:windowSoftInputMode="stateHidden|adjustPan"
感谢你在前进
推荐答案
在你showKeyboard功能,您呼叫:
In your showKeyboard function you are calling:
imm.hideSoftInputFromWindow(this._textView.getWindowToken(), InputMethodManager.SHOW_IMPLICIT);
这将隐藏的窗口softInput键盘!你想显示的键盘?如果是的话那么你会用:
This will hide the softInput keyboard from the window!Do you want to show the keyboard? If yes then would you use:
imm.showSoftInput(view, flags, resultReceiver);
编辑:我想你也可以从InputMethodManager,尝试切换键盘:
I think you can also toggle the keyboard from the InputMethodManager, try:
imm.toggleSoftInput(0, 0);
这篇关于机器人 - 显示软键盘上的需求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!