Пример #1
0
  @Implementation
  public void show() {
    setLatestDialog(this);
    shownDialogs.add(realDialog);
    isShowing = true;
    try {
      if (!hasShownBefore) {
        Method onCreateMethod = Dialog.class.getDeclaredMethod("onCreate", Bundle.class);
        onCreateMethod.setAccessible(true);
        onCreateMethod.invoke(realDialog, (Bundle) null);
      }

      Method onStartMethod = Dialog.class.getDeclaredMethod("onStart");
      onStartMethod.setAccessible(true);
      onStartMethod.invoke(realDialog);
    } catch (Exception e) {
      throw new RuntimeException(e);
    }
    hasShownBefore = true;
  }
Пример #2
0
 public static void reset() {
   setLatestDialog(null);
   shownDialogs.clear();
 }