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

    <bdo id='kFV6q'></bdo><ul id='kFV6q'></ul>

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

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

        <tfoot id='kFV6q'></tfoot>
        <legend id='kFV6q'><style id='kFV6q'><dir id='kFV6q'><q id='kFV6q'></q></dir></style></legend>

        5秒后Android關閉對話框?

        Android close dialog after 5 seconds?(5秒后Android關閉對話框?)
      1. <tfoot id='BgmHA'></tfoot>

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

        • <legend id='BgmHA'><style id='BgmHA'><dir id='BgmHA'><q id='BgmHA'></q></dir></style></legend>

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

                  本文介紹了5秒后Android關閉對話框?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在開發一個無障礙應用.當用戶想離開應用程序時,我會顯示一個對話框,他必須在其中確認他想離開,如果他在 5 秒后未確認,則對話框應自動關閉(因為用戶可能不小心打開了它).這類似于您更改屏幕分辨率時在 Windows 上發生的情況(出現警告,如果您不確認,它會恢復到以前的配置).

                  I'm working on an accesibility app. When the user wants to leave the app I show a dialog where he has to confirm he wants to leave, if he doesn't confirm after 5 seconds the dialog should close automatically (since the user probably opened it accidentally). This is similar to what happens on Windows when you change the screen resolution (an alert appears and if you don't confirm it, it reverts to the previous configuration).

                  這就是我顯示對話框的方式:

                  This is how I show the dialog:

                  AlertDialog.Builder dialog = new AlertDialog.Builder(this).setTitle("Leaving launcher").setMessage("Are you sure you want to leave the launcher?");
                              dialog.setPositiveButton("Confirm", new DialogInterface.OnClickListener() {
                                  @Override
                                  public void onClick(DialogInterface dialog, int whichButton) {
                                      exitLauncher();
                                  }
                              });
                              dialog.create().show();
                  

                  如何在顯示 5 秒后關閉對話框?

                  How can I close the dialog 5 seconds after showing it?

                  推薦答案

                  final AlertDialog.Builder dialog = new AlertDialog.Builder(this).setTitle("Leaving launcher").setMessage("Are you sure you want to leave the launcher?");
                  dialog.setPositiveButton("Confirm", new DialogInterface.OnClickListener() {
                      @Override
                      public void onClick(DialogInterface dialog, int whichButton) {
                          exitLauncher();
                      }
                  });     
                  final AlertDialog alert = dialog.create();
                  alert.show();
                  
                  // Hide after some seconds
                  final Handler handler  = new Handler();
                  final Runnable runnable = new Runnable() {
                      @Override
                      public void run() {
                          if (alert.isShowing()) {
                              alert.dismiss();
                          }
                      }
                  };
                  
                  alert.setOnDismissListener(new DialogInterface.OnDismissListener() {
                      @Override
                      public void onDismiss(DialogInterface dialog) {
                          handler.removeCallbacks(runnable);
                      }
                  });
                  
                  handler.postDelayed(runnable, 10000);
                  

                  這篇關于5秒后Android關閉對話框?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

                  How can I detect integer overflow on 32 bits int?(如何檢測 32 位 int 上的整數溢出?)
                  Local variables before return statements, does it matter?(return 語句之前的局部變量,這有關系嗎?)
                  How to convert Integer to int?(如何將整數轉換為整數?)
                  How do I create an int array with randomly shuffled numbers in a given range(如何在給定范圍內創建一個隨機打亂數字的 int 數組)
                  Inconsistent behavior on java#39;s ==(java的行為不一致==)
                  Why is Java able to store 0xff000000 as an int?(為什么 Java 能夠將 0xff000000 存儲為 int?)
                  <i id='DU0tt'><tr id='DU0tt'><dt id='DU0tt'><q id='DU0tt'><span id='DU0tt'><b id='DU0tt'><form id='DU0tt'><ins id='DU0tt'></ins><ul id='DU0tt'></ul><sub id='DU0tt'></sub></form><legend id='DU0tt'></legend><bdo id='DU0tt'><pre id='DU0tt'><center id='DU0tt'></center></pre></bdo></b><th id='DU0tt'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='DU0tt'><tfoot id='DU0tt'></tfoot><dl id='DU0tt'><fieldset id='DU0tt'></fieldset></dl></div>

                          <tbody id='DU0tt'></tbody>
                        • <bdo id='DU0tt'></bdo><ul id='DU0tt'></ul>
                        • <tfoot id='DU0tt'></tfoot>

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

                            <legend id='DU0tt'><style id='DU0tt'><dir id='DU0tt'><q id='DU0tt'></q></dir></style></legend>
                            主站蜘蛛池模板: 国产精品美女久久久久aⅴ国产馆 | 亚洲第一女人av | 成人欧美一区二区三区黑人孕妇 | xx视频在线观看 | 亚洲精品久久久久久国产精华液 | 午夜影院在线观看 | 在线免费亚洲视频 | 香蕉久久av| 国产精品一区二区久久 | 黄色在线免费网站 | 一区二区三区四区视频 | 亚洲精品美女 | 日韩精品三区 | av手机免费在线观看 | 国产精品黄色 | 欧美精品啪啪 | 久草.com| 久久久久久免费毛片精品 | v片网站| 91在线观看网址 | 一区亚洲| 欧美精品久久久久 | 亚洲 成人 在线 | 天天拍天天插 | 亚洲播放| 精品中文字幕视频 | 日韩中文久久 | 黑人精品欧美一区二区蜜桃 | 蜜桃av人人夜夜澡人人爽 | 午夜影院中文字幕 | 91精品国产综合久久久亚洲 | 91免费视频 | 亚洲国产成人精品久久久国产成人一区 | 亚洲精品99 | 一区二区三区中文字幕 | 精品国产乱码久久久久久果冻传媒 | 欧美a∨ | 男女网站视频 | 欧美片网站免费 | 精品日韩一区二区 | 精品久久久一区 |