<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          android-ActionQueueAndroid 開(kāi)發(fā)包

          聯(lián)合創(chuàng)作 · 2023-09-25 03:45

          ActionQueue 允許你一個(gè)一個(gè)的執(zhí)行任務(wù)。

          導(dǎo)入:

          allprojects {
              repositories {
                  mavenCentral()
                  maven {
                      url "https://oss.sonatype.org/content/repositories/snapshots"
                  }
                  jcenter()
              }
          }

          加依賴:

          compile 'in.srain.cube:action-queue:1.0.1'

          使用

          創(chuàng)建 action:

          String[] messageList = new String[]{
                  "message 1",
                  "message 2",
                  "message 3",
          };
          for (int i = 0; i < messageList.length; i++) {
              String message = messageList[i];
              PopDialogAction action = new PopDialogAction(message);
              mActionQueue.add(action);
          }

          處理 action:

          class PopDialogAction extends ActionQueue.Action<String> {
              public PopDialogAction(String badge) {
                  super(badge);
              }
              @Override
              public void onAction() {
                  AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);
                  Dialog dialog = builder.setMessage(getBadge()).show();
                  // notify action is done, and next aciton will be executed
                  dialog.setOnDismissListener(mOnDismissListener);
              }
          }

          action 執(zhí)行完之后通知提醒:

             DialogInterface.OnDismissListener mOnDismissListener = new DialogInterface.OnDismissListener() {
                  @Override
                  public void onDismiss(DialogInterface dialog) {
                      mActionQueue.notifyActionDoneThenTryToPopNext();
                  }
              };
          瀏覽 20
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          評(píng)論
          圖片
          表情
          推薦
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  欧美理论视频在线观看 | 午夜福利视频性爱 | aaa在线免费观看 | 免费看男女日逼吧 | 成人18女人毛片 |