private void setSiteSecurityVisibility(boolean visible, EnumSet<UpdateFlags> flags) {
    // We don't hide site security on tablet.
    if (visible == mSiteSecurityVisible || HardwareUtils.isTablet()) {
      return;
    }

    mSiteSecurityVisible = visible;

    mTitle.clearAnimation();
    mSiteSecurity.clearAnimation();

    if (flags.contains(UpdateFlags.DISABLE_ANIMATIONS)) {
      mSiteSecurity.setVisibility(visible ? View.VISIBLE : View.GONE);
      return;
    }

    // If any of these animations were cancelled as a result of the
    // clearAnimation() calls above, we need to reset them.
    mLockFadeIn.reset();
    mTitleSlideLeft.reset();
    mTitleSlideRight.reset();

    if (mForwardAnim != null) {
      long delay = mForwardAnim.getRemainingTime();
      mTitleSlideRight.setStartOffset(delay);
      mTitleSlideLeft.setStartOffset(delay);
    } else {
      mTitleSlideRight.setStartOffset(0);
      mTitleSlideLeft.setStartOffset(0);
    }

    mTitle.startAnimation(visible ? mTitleSlideRight : mTitleSlideLeft);
  }
  void start() {
    mPreview.resumeShooting();
    mMode = 1;
    // フォーカスボタン、マスクボタン、ズームボタンを見えなくする
    // for 1.5 撮影中でもフォーカスできるようにする
    // mFocusButton.setVisibility(View.INVISIBLE);

    // アニメーションをクリアしてからでないとvisibilityが操作できないためクリア
    mMaskButton.clearAnimation();
    mMaskButton.setVisibility(View.INVISIBLE);
    if (mPreview.isZoomSupported()) {
      FrameLayout zoom = (FrameLayout) findViewById(R.id.zoom_layout);
      zoom.setVisibility(View.INVISIBLE);
    }
  }
 void enableMask() {
   // 隠しモードボタンを表示する(撮影時以下)
   if (mMode == 0) {
     mMaskButton.clearAnimation();
     mMaskButton.setVisibility(View.VISIBLE);
     // TODO:for tablet
     if (mDegree != 0) {
       RotateAnimation rotate =
           new RotateAnimation(
               0, mPrevTarget, mMaskButton.getWidth() / 2, mMaskButton.getHeight() / 2);
       rotate.setDuration(0);
       rotate.setFillAfter(true);
       mMaskButton.startAnimation(rotate);
     }
   }
 }
  void stop() {
    mPreview.stopShooting();
    mMode = 0;
    // フォーカスボタン、マスクボタン、ズームボタンを見えるようにする
    // mFocusButton.setVisibility(View.VISIBLE);
    mMaskButton.clearAnimation();
    mMaskButton.setVisibility(View.VISIBLE);
    // TODO:for tablet
    if (mDegree != 0) {
      RotateAnimation rotate =
          new RotateAnimation(
              0, mPrevTarget, mMaskButton.getWidth() / 2, mMaskButton.getHeight() / 2);
      rotate.setDuration(0);
      rotate.setFillAfter(true);
      mMaskButton.startAnimation(rotate);
    }

    if (mPreview.isZoomSupported()) {
      FrameLayout zoom = (FrameLayout) findViewById(R.id.zoom_layout);
      zoom.setVisibility(View.VISIBLE);
    }
  }
 void disableMask() {
   // 隠しモードボタンを見えなくする
   mMaskButton.clearAnimation();
   mMaskButton.setVisibility(View.INVISIBLE);
 }
Example #6
0
 protected void showFab(boolean show) {
   mFab.clearAnimation();
   mFab.startAnimation(show ? mFabIn : mFabOut);
 }