コード例 #1
0
 private void onUp(boolean followedByLongPress) {
   if (followedByLongPress) {
     // Avoid showing press-up animations for long-press.
     mAlbumSetView.setPressedIndex(-1);
   } else {
     mAlbumSetView.setPressedUp();
   }
 }
コード例 #2
0
ファイル: AlbumSetPage.java プロジェクト: gityouzi/Camera
 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);
 }
コード例 #3
0
  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);
    }
  }
コード例 #4
0
ファイル: AlbumSetPage.java プロジェクト: gityouzi/Camera
  @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
  }
コード例 #5
0
 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);
 }
コード例 #6
0
        @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);
        }
コード例 #7
0
 @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);
   }
 }
コード例 #8
0
 private void hideDetails() {
   mShowDetails = false;
   mDetailsHelper.hide();
   mAlbumSetView.setHighlightItemPath(null);
   mSlotView.invalidate();
 }
コード例 #9
0
 private void onDown(int index) {
   mAlbumSetView.setPressedIndex(index);
 }
コード例 #10
0
ファイル: AlbumSetPage.java プロジェクト: gityouzi/Camera
 private void onDown(int index) {
   mAlbumSetView.setPressedIndex(index);
   // jiangxd add for ycservice
   setYCstate(YC_MODE_SELECT);
 }