예제 #1
0
  @Override
  public void showOverlay() {
    if (mCurrentOverlayMode == OverlayMoveMode.BY_GESTURE) {
      mGestureOverLay.setVisibility(VISIBLE);
      ViewPropertyAnimator animator =
          mOverlay
              .animate()
              .setDuration(AppConstant.Anim.ANIM_DURATION_NORMAL)
              .translationX(mTargetOverlayTranslationX)
              .setInterpolator(new DecelerateInterpolator())
              .setListener(
                  new Animator.AnimatorListener() {
                    @Override
                    public void onAnimationStart(Animator animation) {
                      mGestureOverLay.setVisibility(VISIBLE);
                    }

                    @Override
                    public void onAnimationEnd(Animator animation) {
                      EventBus.getDefault().post(new EventToKnob(EventToKnob.END_STATE_LEFT));
                    }

                    @Override
                    public void onAnimationCancel(Animator animation) {}

                    @Override
                    public void onAnimationRepeat(Animator animation) {}
                  });
      animator.start();
    }
  }
예제 #2
0
 @Override
 public void setGestureOverlayViewVisible(int visibility) {
   mGestureOverLay.setVisibility(visibility);
 }