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

<tfoot id='0MuSR'></tfoot>

    • <bdo id='0MuSR'></bdo><ul id='0MuSR'></ul>

    <legend id='0MuSR'><style id='0MuSR'><dir id='0MuSR'><q id='0MuSR'></q></dir></style></legend>

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

        <small id='0MuSR'></small><noframes id='0MuSR'>

      2. 錯(cuò)誤的窗口令牌,您無(wú)法在創(chuàng)建 Activity 之前或隱

        Bad window token, you cannot show a dialog before an Activity is created or after it#39;s hidden(錯(cuò)誤的窗口令牌,您無(wú)法在創(chuàng)建 Activity 之前或隱藏之后顯示對(duì)話框)

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

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

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

                  本文介紹了錯(cuò)誤的窗口令牌,您無(wú)法在創(chuàng)建 Activity 之前或隱藏之后顯示對(duì)話框的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                  問(wèn)題描述

                  我在我的應(yīng)用程序中使用 AppIntro 庫(kù).

                  I am using an AppIntro library in my app.

                  它有 3 張幻燈片.當(dāng)顯示第三張幻燈片時(shí),我想問(wèn)用戶一些事情.為了實(shí)現(xiàn)這一點(diǎn),我正在使用 afollestad 的材質(zhì)對(duì)話框.

                  It has 3 slides. I want to ask the user something when the third slide is shown. To achieve that I am using material dialogs by afollestad.

                  我在 AppIntro Activity 中的代碼如下所示:

                  My code in the AppIntro Activity looks like that:

                  @Override
                      public void onNextPressed() {
                          if(this.pager.getCurrentItem() == 2) {
                              MaterialDialog dialog = new MaterialDialog.Builder(getApplicationContext())
                                      .title("QR Code scannen")
                                      .content("M?chtest du den QR Code scannen oder selbst eingeben?")
                                      .positiveText("eingeben")
                                      .negativeText("scannen")
                                      .onPositive(new MaterialDialog.SingleButtonCallback() {
                                          @Override
                                          public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
                                              Intent intent = new Intent(getApplicationContext(), RegistrationActivity.class);
                                              startActivity(intent);
                                          }
                                      })
                                      .onNegative(new MaterialDialog.SingleButtonCallback() {
                                          @Override
                                          public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
                                              // TODO
                                          }
                                      })
                                      .show();
                          }
                      } 
                  

                  運(yùn)行應(yīng)用程序當(dāng)我滑到第三張幻燈片時(shí)出現(xiàn)以下問(wèn)題:

                  Running the App I get the following issue when I slide to the third slide:

                  com.afollestad.materialdialogs.MaterialDialog$DialogException: 
                  Bad window token, you cannot show a dialog before an Activity is created or after it's hidden.
                  at com.afollestad.materialdialogs.MaterialDialog.show(MaterialDialog.java:1328)
                  at com.afollestad.materialdialogs.MaterialDialog$Builder.show(MaterialDialog.java:1317)
                  at com.ads.adstimer.fragment.Registration.RegistrationActivity.onNextPressed(RegistrationActivity.java:64)
                  at com.github.paolorotolo.appintro.AppIntro$2.onClick(AppIntro.java:118)
                  at android.view.View.performClick(View.java:5204)
                  at android.view.View$PerformClick.run(View.java:21153)
                  at android.os.Handler.handleCallback(Handler.java:739)
                  at android.os.Handler.dispatchMessage(Handler.java:95)
                  at android.os.Looper.loop(Looper.java:148)
                  at android.app.ActivityThread.main(ActivityThread.java:5417)
                  at java.lang.reflect.Method.invoke(Native Method)
                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
                  

                  我真的不明白這個(gè)問(wèn)題.因?yàn)?AppIntro Activity 已經(jīng)加載,我希望它在顯示特定片段時(shí)顯示一個(gè)對(duì)話框.

                  I do not really understand the problem. Because the AppIntro Activity is already loaded and I expect it to show a dialog when a specific fragment is shown.

                  如何實(shí)現(xiàn)在顯示特定幻燈片時(shí)顯示對(duì)話框?

                  How can I achieve to show a dialog when a specific slide is shown?

                  推薦答案

                  MaterialDialog dialog = new MaterialDialog.Builder(getApplicationContext())
                  

                  我想你需要在這里傳遞 Activity 實(shí)例,而不是應(yīng)用程序上下文.

                  I suppose you need to pass the Activity instance here, not the application context.

                  這篇關(guān)于錯(cuò)誤的窗口令牌,您無(wú)法在創(chuàng)建 Activity 之前或隱藏之后顯示對(duì)話框的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

                  Get user#39;s current location using GPS(使用 GPS 獲取用戶的當(dāng)前位置)
                  IllegalArgumentException thrown by requestLocationUpdate()(requestLocationUpdate() 拋出的 IllegalArgumentException)
                  How reliable is LocationManager#39;s getLastKnownLocation and how often is it updated?(LocationManager 的 getLastKnownLocation 有多可靠,多久更新一次?)
                  How to detect Location Provider ? GPS or Network Provider(如何檢測(cè)位置提供者?GPS 或網(wǎng)絡(luò)提供商)
                  Get current location during app launch(在應(yīng)用啟動(dòng)期間獲取當(dāng)前位置)
                  locationManager.getLastKnownLocation() return null(locationManager.getLastKnownLocation() 返回 null)
                      <tbody id='KQqAL'></tbody>

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

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

                          1. 主站蜘蛛池模板: 精品一区二区三区在线视频 | 亚洲一区二区三区免费 | 亚洲精品久久久久中文字幕欢迎你 | 一级做a毛片 | 国产一在线观看 | 秋霞精品 | 亚洲一区二区中文字幕在线观看 | 国产一区二区三区久久久久久久久 | 男女国产视频 | 一级片片 | 九九激情视频 | 日日噜| www.日韩系列 | 黄网站免费在线观看 | 黄色中文字幕 | 毛片久久久 | 亚洲午夜精品 | 日本理论片好看理论片 | 波多野结衣一区二区 | 91精品国产乱码久久久久久久久 | 色精品视频 | 国产日韩一区二区三免费高清 | 日韩精品| 日本久久视频 | 日韩美香港a一级毛片免费 国产综合av | 男人的天堂中文字幕 | 久久久久高清 | 国产真实乱对白精彩久久小说 | 在线视频 亚洲 | 日本激情视频中文字幕 | 久久精品视频亚洲 | 国产精品久久久久久久久久久久久久 | 玖玖视频 | 午夜三区 | 一区二区av| 午夜影院在线观看版 | 精品成人免费一区二区在线播放 | 羞羞视频一区二区 | 日韩一级精品视频在线观看 | 欧州一区二区三区 | heyzo在线|