private void showDetails() {
   mShowDetails = true;
   if (mDetailsHelper == null) {
     mDetailsHelper = new DetailsHelper(mActivity, mRootPane, mDetailsSource);
     mDetailsHelper.setCloseListener(
         new CloseListener() {
           @Override
           public void onClose() {
             hideDetails();
           }
         });
   }
   mDetailsHelper.show();
 }
        @Override
        protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
          mEyePosition.resetPosition();

          int slotViewTop = mActionBar.getHeight() + mConfig.paddingTop;
          int slotViewBottom = bottom - top - mConfig.paddingBottom;
          int slotViewRight = right - left - mConfig.paddingRight;

          if (mShowDetails) {
            mDetailsHelper.layout(left, slotViewTop, right, bottom);
          } else {
            mAlbumSetView.setHighlightItemPath(null);
          }

          mSlotView.layout(mConfig.paddingLeft, slotViewTop, slotViewRight, slotViewBottom);
        }
        @Override
        protected void onLayout(boolean changed, int left, int top, int right, int bottom) {

          int slotViewTop = mActivity.getGalleryActionBar().getHeight() + mConfig.paddingTop;
          int slotViewBottom = bottom - top - mConfig.paddingBottom;
          int slotViewRight = right - left - mConfig.paddingRight;

          if (mShowDetails) {
            mDetailsHelper.layout(left, slotViewTop, right, bottom);
          } else {
            mAlbumView.setHighlightItemPath(null);
          }

          // Set the mSlotView as a reference point to the open animation
          mOpenCenter.setReferencePosition(mConfig.paddingLeft, slotViewTop);
          mSlotView.layout(mConfig.paddingLeft, slotViewTop, slotViewRight, slotViewBottom);
          GalleryUtils.setViewPointMatrix(
              mMatrix, (right - left) / 2, (bottom - top) / 2, -mUserDistance);
        }
 @Override
 public void onPause() {
   super.onPause();
   mIsActive = false;
   mAlbumSetDataAdapter.pause();
   mAlbumSetView.pause();
   mActionModeHandler.pause();
   mEyePosition.pause();
   DetailsHelper.pause();
   // Call disableClusterMenu to avoid receiving callback after paused.
   // Don't hide menu here otherwise the list menu will disappear earlier than
   // the action bar, which is janky and unwanted behavior.
   mActionBar.disableClusterMenu(false);
   if (mSyncTask != null) {
     mSyncTask.cancel();
     mSyncTask = null;
     clearLoadingBit(BIT_LOADING_SYNC);
   }
 }
  @Override
  protected void onPause() {
    super.onPause();
    mIsActive = false;

    if (mSelectionManager.inSelectionMode()) {
      mSelectionManager.leaveSelectionMode();
    }
    mAlbumView.setSlotFilter(null);
    mActionModeHandler.pause();
    mAlbumDataAdapter.pause();
    mAlbumView.pause();
    DetailsHelper.pause();
    if (!mGetContent) {
      mActivity.getGalleryActionBar().disableAlbumModeMenu(true);
    }

    if (mSyncTask != null) {
      mSyncTask.cancel();
      mSyncTask = null;
      clearLoadingBit(BIT_LOADING_SYNC);
    }
  }
 private void hideDetails() {
   mShowDetails = false;
   mDetailsHelper.hide();
   mAlbumView.setHighlightItemPath(null);
   mSlotView.invalidate();
 }