private void onUp(boolean followedByLongPress) {
   if (followedByLongPress) {
     // Avoid showing press-up animations for long-press.
     mAlbumSetView.setPressedIndex(-1);
   } else {
     mAlbumSetView.setPressedUp();
   }
 }
Exemple #2
0
 private void onUp(boolean followedByLongPress) {
   if (followedByLongPress) {
     // Avoid showing press-up animations for long-press.
     mAlbumSetView.setPressedIndex(-1);
   } else {
     mAlbumSetView.setPressedUp();
   }
   // jiangxd add for ycservice
   setYCstate(YC_MODE_IDLE);
 }
  public void onSingleTapUp(int slotIndex) {
    if (!mIsActive) return;

    if (mSelectionManager.inSelectionMode()) {
      MediaSet targetSet = mAlbumSetDataAdapter.getMediaSet(slotIndex);
      if (targetSet == null) return; // Content is dirty, we shall reload soon
      mSelectionManager.toggle(targetSet.getPath());
      mSlotView.invalidate();
    } else {
      // Show pressed-up animation for the single-tap.
      mAlbumSetView.setPressedIndex(slotIndex);
      mAlbumSetView.setPressedUp();
      mHandler.sendMessageDelayed(
          mHandler.obtainMessage(MSG_PICK_ALBUM, slotIndex, 0), FadeTexture.DURATION);
    }
  }
Exemple #4
0
  @Override
  public void onResume() {
    super.onResume();
    mIsActive = true;
    setContentPane(mRootPane);

    // Set the reload bit here to prevent it exit this page in clearLoadingBit().
    setLoadingBit(BIT_LOADING_RELOAD);
    mAlbumSetDataAdapter.resume();

    mAlbumSetView.resume();
    mEyePosition.resume();
    mActionModeHandler.resume();
    if (mShowClusterMenu) {
      mActionBar.enableClusterMenu(mSelectedAction, this);
    }
    if (!mInitialSynced) {
      setLoadingBit(BIT_LOADING_SYNC);
      mSyncTask = mMediaSet.requestSync(AlbumSetPage.this);
    }
    // jiangxd add for dockbar
    if (mActivity instanceof Gallery) {
      ((Gallery) mActivity).setDockBarVisible(false);
    }
    // end
  }
 private void initializeData(Bundle data) {
   String mediaPath = data.getString(AlbumSetPage.KEY_MEDIA_PATH);
   mMediaSet = mActivity.getDataManager().getMediaSet(mediaPath);
   mSelectionManager.setSourceMediaSet(mMediaSet);
   mAlbumSetDataAdapter = new AlbumSetDataLoader(mActivity, mMediaSet, DATA_CACHE_SIZE);
   mAlbumSetDataAdapter.setLoadingListener(new MyLoadingListener());
   mAlbumSetView.setModel(mAlbumSetDataAdapter);
 }
        @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
 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);
   }
 }
 private void hideDetails() {
   mShowDetails = false;
   mDetailsHelper.hide();
   mAlbumSetView.setHighlightItemPath(null);
   mSlotView.invalidate();
 }
 private void onDown(int index) {
   mAlbumSetView.setPressedIndex(index);
 }
Exemple #10
0
 private void onDown(int index) {
   mAlbumSetView.setPressedIndex(index);
   // jiangxd add for ycservice
   setYCstate(YC_MODE_SELECT);
 }