<i id='tHytx'><tr id='tHytx'><dt id='tHytx'><q id='tHytx'><span id='tHytx'><b id='tHytx'><form id='tHytx'><ins id='tHytx'></ins><ul id='tHytx'></ul><sub id='tHytx'></sub></form><legend id='tHytx'></legend><bdo id='tHytx'><pre id='tHytx'><center id='tHytx'></center></pre></bdo></b><th id='tHytx'></th></span></q></dt></tr></i><div id='tHytx'><tfoot id='tHytx'></tfoot><dl id='tHytx'><fieldset id='tHytx'></fieldset></dl></div>

<tfoot id='tHytx'></tfoot>
    1. <legend id='tHytx'><style id='tHytx'><dir id='tHytx'><q id='tHytx'></q></dir></style></legend>
      • <bdo id='tHytx'></bdo><ul id='tHytx'></ul>

      <small id='tHytx'></small><noframes id='tHytx'>

        如何在对话框显示时隐藏键盘?

        时间:2023-08-30
            1. <i id='3jsIU'><tr id='3jsIU'><dt id='3jsIU'><q id='3jsIU'><span id='3jsIU'><b id='3jsIU'><form id='3jsIU'><ins id='3jsIU'></ins><ul id='3jsIU'></ul><sub id='3jsIU'></sub></form><legend id='3jsIU'></legend><bdo id='3jsIU'><pre id='3jsIU'><center id='3jsIU'></center></pre></bdo></b><th id='3jsIU'></th></span></q></dt></tr></i><div id='3jsIU'><tfoot id='3jsIU'></tfoot><dl id='3jsIU'><fieldset id='3jsIU'></fieldset></dl></div>
                <bdo id='3jsIU'></bdo><ul id='3jsIU'></ul>
                <tfoot id='3jsIU'></tfoot>
                  <tbody id='3jsIU'></tbody>

                  <legend id='3jsIU'><style id='3jsIU'><dir id='3jsIU'><q id='3jsIU'></q></dir></style></legend>
                • <small id='3jsIU'></small><noframes id='3jsIU'>

                  本文介绍了如何在对话框显示时隐藏键盘?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我有一个自定义对话框,其中包含 EditText.当对话框出现时,焦点在 EditText 上,并且显示了软键盘.如何避免这种情况?我试过了:

                  I have a custom dialog with a EditText in it. When the dialog appear the focus is on the EditText, and the soft keyboard is showing. How to avoid this? I tried:

                  getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
                  

                  InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
                  imm.hideSoftInputFromWindow(edittext.getWindowToken(), 0);
                  

                  但它们对我不起作用.我认为这些不适用于对话.

                  but they don't work for me. I think these don't work for dialog.

                  推荐答案

                  你试过了吗?我已经测试过了.它工作正常.

                  Have u tried this?I have tested it.It is working.

                  改变

                  getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
                  

                  收件人

                  dialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
                  

                  这篇关于如何在对话框显示时隐藏键盘?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:禁止谷歌地图意图选择对话框 下一篇:Android:如何以编程方式将 Activity 的主题设置为

                  相关文章

                  最新文章

                  <i id='o8pR6'><tr id='o8pR6'><dt id='o8pR6'><q id='o8pR6'><span id='o8pR6'><b id='o8pR6'><form id='o8pR6'><ins id='o8pR6'></ins><ul id='o8pR6'></ul><sub id='o8pR6'></sub></form><legend id='o8pR6'></legend><bdo id='o8pR6'><pre id='o8pR6'><center id='o8pR6'></center></pre></bdo></b><th id='o8pR6'></th></span></q></dt></tr></i><div id='o8pR6'><tfoot id='o8pR6'></tfoot><dl id='o8pR6'><fieldset id='o8pR6'></fieldset></dl></div>

                    <bdo id='o8pR6'></bdo><ul id='o8pR6'></ul>
                  <legend id='o8pR6'><style id='o8pR6'><dir id='o8pR6'><q id='o8pR6'></q></dir></style></legend>

                    1. <small id='o8pR6'></small><noframes id='o8pR6'>

                    2. <tfoot id='o8pR6'></tfoot>