public void onDestroy() {
   if (windowManager != null && floatingImage != null) {
     windowManager.removeViewImmediate(floatingImage);
     windowManager.removeViewImmediate(view);
   }
   if (onMyAppsLoader != null) {
     onMyAppsLoader.unregisterListener(onLoadCompleteListener);
     onMyAppsLoader.cancelLoad();
     onMyAppsLoader.stopLoading();
   }
   if (AppController.getController().eventBus().isRegistered(this)) {
     AppController.getController().eventBus().unregister(this);
   }
   EventTrackerHelper.sendEvent("FloatingHorizontalLayout", "onDestroy", "onDestroy");
 }
 /**
  * FORCE the popup window to be removed. You typically calls this when the parent view is being
  * removed from the window to avoid a Window Leak
  */
 public void dismissComplete() {
   if (isShowing()) {
     mShowing = false;
     try {
       mWindowManager.removeViewImmediate(mPopupView);
     } finally {
     }
   }
 }
  void removeView(Context context) {
    if (addedView == null) return;

    try {
      WindowManager windowManager =
          (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
      windowManager.removeViewImmediate(addedView);
    } catch (Exception e) {
      e.printStackTrace();
    } finally {
      addedView = null;
    }
  }
  /**
   * Release references to Drawables and put the BackgroundManager into the detached state. Called
   * when the associated Activity is destroyed.
   *
   * @hide
   */
  void detach() {
    if (DEBUG) Log.v(TAG, "detach");
    release();

    if (mWindowManager != null && mBgView != null) {
      mWindowManager.removeViewImmediate(mBgView);
    }

    mWindowManager = null;
    mWindow = null;
    mBgView = null;
    mAttached = false;

    if (mService != null) {
      mService.unref();
      mService = null;
    }
  }
Ejemplo n.º 5
0
  void dismissDialog() {
    if (mDecor == null || !mShowing) {
      return;
    }

    // if (mWindow.isDestroyed()) {
    // Log.e(TAG, "Tried to dismissDialog() but the Dialog's window was already destroyed!");
    // return;
    // }

    try {
      mWindowManager.removeViewImmediate(mDecor);
    } finally {
      mDecor = null;
      mWindow.closeAllPanels();
      onStop();
      mShowing = false;

      sendDismissMessage();
    }
  }
Ejemplo n.º 6
0
  void dismissDialog() {
    if (mDecor == null || !mShowing) {
      return;
    }

    if (mWindow.isDestroyed()) {
      Log.e(TAG, "Tried to dismissDialog() but the Dialog's window was already destroyed!");
      return;
    }

    try {
      mWindowManager.removeViewImmediate(mDecor);
    } finally {
      if (mActionMode != null) {
        mActionMode.finish();
      }
      mDecor = null;
      mWindow.closeAllPanels();
      onStop();
      mShowing = false;
      Log.d(TAG, "dismissDialog");
      sendDismissMessage();
    }
  }
 public void destroy() {
   mWindowManager.removeViewImmediate(mView);
 }