久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

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

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

        <small id='8TISY'></small><noframes id='8TISY'>

        Android - 鍵盤未出現(xiàn)在浮動窗口中

        Android - Keyboard not appearing in floating window(Android - 鍵盤未出現(xiàn)在浮動窗口中)
        <tfoot id='sQUTs'></tfoot>

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

              <i id='sQUTs'><tr id='sQUTs'><dt id='sQUTs'><q id='sQUTs'><span id='sQUTs'><b id='sQUTs'><form id='sQUTs'><ins id='sQUTs'></ins><ul id='sQUTs'></ul><sub id='sQUTs'></sub></form><legend id='sQUTs'></legend><bdo id='sQUTs'><pre id='sQUTs'><center id='sQUTs'></center></pre></bdo></b><th id='sQUTs'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='sQUTs'><tfoot id='sQUTs'></tfoot><dl id='sQUTs'><fieldset id='sQUTs'></fieldset></dl></div>
                • <small id='sQUTs'></small><noframes id='sQUTs'>

                • 本文介紹了Android - 鍵盤未出現(xiàn)在浮動窗口中的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  我正在編寫一個應(yīng)用程序,它使用以下代碼在正在運(yùn)行的應(yīng)用程序的屏幕上繪制編輯文本:

                  I'm writing an application that uses the following code to draw an edittext on the screen over running applications:

                  WindowManager.LayoutParams params = new WindowManager.LayoutParams(
                                  WindowManager.LayoutParams.WRAP_CONTENT,
                                  WindowManager.LayoutParams.WRAP_CONTENT,
                                  WindowManager.LayoutParams.TYPE_PHONE,
                                  WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
                                      | WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM,
                                  PixelFormat.TRANSLUCENT);
                  
                  windowManager = (WindowManager) getSystemService(WINDOW_SERVICE);
                  
                  windowManager.addView(mEditText, params);
                  

                  edittext的xml是:

                  The xml for the edittext is:

                  <EditText
                              android:id="@+id/mEditText"
                              android:layout_width="match_parent"
                              android:layout_height="wrap_content"
                              android:maxLines="3"
                              android:inputType="textAutoComplete|text"
                              android:focusable="true"
                              android:focusableInTouchMode="true" />
                  

                  但是,專注于此并不會調(diào)出鍵盤.我還嘗試通過 onFocusListener 以編程方式提出它:

                  However focusing on this does not bring up the keyboard. I've also tried programmatically bringing it up with an onFocusListener:

                  mEditText.setOnFocusChangeListener(new View.OnFocusChangeListener() {
                              @Override
                              public void onFocusChange(View v, boolean hasFocus) {
                                  if(hasFocus) {
                                      Log.d("", "Has focus");
                                      ((InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE)).showSoftInput(v, InputMethodManager.SHOW_IMPLICIT);
                                  } else {
                                      Log.d("", "Lost focus");
                                  }
                              }
                          });
                  

                  但是,從 logcat 中可以看出,盡管調(diào)用了它,但什么也沒發(fā)生.到目前為止,我發(fā)現(xiàn)顯示鍵盤的唯一方法是使用:

                  But although that is called, as seen from the logcat, nothing happens. The only method I've found so far to display the keyboard is using:

                  getSystemService(Context.INPUT_METHOD_SERVICE)).toggleSoftInput(0, 0);
                  

                  但這似乎是在屏幕上輸入而不是在編輯文本中.當(dāng)顯示編輯文本時,我也嘗試過清晰可聚焦,但無濟(jì)于事.

                  But that seems to type onto the screen and not into the edittext. I've also tried clear focusable when the edittext is displayed but to no avail.

                  我猜這個問題是因?yàn)槲沂褂玫氖歉哟翱?,但必須有一種方法可以使這項(xiàng)工作成為可能,因?yàn)?Playstore 中存在浮動計(jì)算器等應(yīng)用程序,它們需要輸入.有人有什么想法嗎?我被難住了:(

                  I'm guessing the issue is because I'm using a "floating window" but there must be a way to make this work as apps such as floating calculators exist on the playstore which take input.. Anyone have any ideas? I'm stumped :(

                  推薦答案

                  我的錯.. 我意識到如果我刪除 WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE 它可以正常工作.. 愚蠢的錯誤

                  My bad.. I realized if I remove the WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE it works fine.. silly mistake

                  這篇關(guān)于Android - 鍵盤未出現(xiàn)在浮動窗口中的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  How can I detect integer overflow on 32 bits int?(如何檢測 32 位 int 上的整數(shù)溢出?)
                  Local variables before return statements, does it matter?(return 語句之前的局部變量,這有關(guān)系嗎?)
                  How to convert Integer to int?(如何將整數(shù)轉(zhuǎn)換為整數(shù)?)
                  How do I create an int array with randomly shuffled numbers in a given range(如何在給定范圍內(nèi)創(chuàng)建一個隨機(jī)打亂數(shù)字的 int 數(shù)組)
                  Inconsistent behavior on java#39;s ==(java的行為不一致==)
                  Why is Java able to store 0xff000000 as an int?(為什么 Java 能夠?qū)?0xff000000 存儲為 int?)
                    <tbody id='fwyfl'></tbody>

                  <tfoot id='fwyfl'></tfoot>

                  <i id='fwyfl'><tr id='fwyfl'><dt id='fwyfl'><q id='fwyfl'><span id='fwyfl'><b id='fwyfl'><form id='fwyfl'><ins id='fwyfl'></ins><ul id='fwyfl'></ul><sub id='fwyfl'></sub></form><legend id='fwyfl'></legend><bdo id='fwyfl'><pre id='fwyfl'><center id='fwyfl'></center></pre></bdo></b><th id='fwyfl'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='fwyfl'><tfoot id='fwyfl'></tfoot><dl id='fwyfl'><fieldset id='fwyfl'></fieldset></dl></div>
                      <legend id='fwyfl'><style id='fwyfl'><dir id='fwyfl'><q id='fwyfl'></q></dir></style></legend>

                        • <bdo id='fwyfl'></bdo><ul id='fwyfl'></ul>
                          1. <small id='fwyfl'></small><noframes id='fwyfl'>

                            主站蜘蛛池模板: jvid精品资源在线观看 | 国产片侵犯亲女视频播放 | 国产丝袜一区二区三区免费视频 | 久久精品亚洲精品国产欧美 | 久草高清视频 | www.av在线 | 亚洲黄色av | 久久高清 | 一区中文字幕 | 午夜视频在线免费观看 | 99re热精品视频 | 蜜月aⅴ免费一区二区三区 99re在线视频 | 亚洲啪啪 | 在线āv视频 | 国产精品福利网站 | 四虎永久免费地址 | h视频在线看 | 精品久久久久久18免费网站 | 99热这里都是精品 | 免费视频一区二区三区在线观看 | 国产三区av| 亚洲欧美日韩精品久久亚洲区 | 国产目拍亚洲精品99久久精品 | 精品视频在线免费观看 | 久久久成人免费一区二区 | 亚洲午夜av久久乱码 | 欧美视频精品 | 日韩一区二区三区在线视频 | 九九伦理电影 | 日韩一级免费 | 日本不卡一区二区三区 | 日韩av看片 | 男女羞羞免费网站 | 国产中文在线观看 | 国产一级片在线观看视频 | 久久综合一区 | 国产成人精品一区二区三区在线 | 亚洲成av| 亚洲九九精品 | 国产女人与拘做视频免费 | 久久精品国产99国产精品亚洲 |