/** * Lifting view * * @param view The animation target * @param baseRotation initial Rotation X in 3D space * @param duration aniamtion duration */ @Deprecated public static void liftingFromBottom(View view, float baseRotation, int duration){ ViewHelper.setRotationX(view, baseRotation); ViewHelper.setTranslationY(view, view.getHeight() / 3); ViewPropertyAnimator .animate(view) .setInterpolator(new AccelerateDecelerateInterpolator()) .setDuration(duration) .rotationX(0) .translationY(0) .start(); }
/** * Lifting view * * @param view The animation target * @param baseRotation initial Rotation X in 3D space * @param duration aniamtion duration * @param startDelay start delay before animation begin */ @Deprecated public static void liftingFromBottom(View view, float baseRotation, int duration, int startDelay){ ViewHelper.setRotationX(view, baseRotation); ViewHelper.setTranslationY(view, view.getHeight() / 3); ViewPropertyAnimator .animate(view) .setInterpolator(new AccelerateDecelerateInterpolator()) .setDuration(duration) .setStartDelay(startDelay) .rotationX(0) .translationY(0) .start(); }
/** * Lifting view * * @param view The animation target * @param baseRotation initial Rotation X in 3D space * @param fromY initial Y position of view * @param duration aniamtion duration * @param startDelay start delay before animation begin */ @Deprecated public static void liftingFromBottom(View view, float baseRotation, float fromY, int duration, int startDelay){ ViewHelper.setRotationX(view, baseRotation); ViewHelper.setTranslationY(view, fromY); ViewPropertyAnimator .animate(view) .setInterpolator(new AccelerateDecelerateInterpolator()) .setDuration(duration) .setStartDelay(startDelay) .rotationX(0) .translationY(0) .start(); }
ViewPropertyAnimator.animate(fabBtn).setInterpolator(mInterpolator) .setDuration(TRANSLATE_DURATION_MILLIS) .translationY(translationY);
private void slideUp(int startDelay){ mReAttached = false; ViewPropertyAnimator.animate(mView).setStartDelay(startDelay).alpha(0f) .translationY(-mView.getHeight() + mTranslationY) .setInterpolator(new AccelerateInterpolator()) .setDuration(300) .setListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { if(!mReAttached){ cleanup(); } } }) .start(); mVisible = false; } }
private void showInternal(){ mView.show(); ViewHelper.setTranslationX(mView, (mParentView.getWidth() - mView.getWidth()) / 2); ViewHelper.setAlpha(mView, 0f); ViewHelper.setTranslationY(mView, -mView.getHeight() + mTranslationY); //mView.setVisibility(View.VISIBLE); ViewPropertyAnimator.animate(mView).alpha(1f).translationY(25 + mTranslationY) .setInterpolator(new DecelerateInterpolator()) .setListener(null) .setDuration(300).setStartDelay(0).start(); mVisible = true; }
/** * Lifting view * * @param view The animation target * @param baseRotation initial Rotation X in 3D space * @param duration aniamtion duration */ public static void liftingFromBottom(View view, float baseRotation, int duration){ ViewHelper.setRotationX(view, baseRotation); ViewHelper.setTranslationY(view, view.getHeight() / 3); ViewPropertyAnimator .animate(view) .setInterpolator(new AccelerateDecelerateInterpolator()) .setDuration(duration) .rotationX(0) .translationY(0) .start(); }
/** * Lifting view * * @param view The animation target * @param baseRotation initial Rotation X in 3D space * @param duration aniamtion duration * @param startDelay start delay before animation begin */ public static void liftingFromBottom(View view, float baseRotation, int duration, int startDelay){ ViewHelper.setRotationX(view, baseRotation); ViewHelper.setTranslationY(view, view.getHeight() / 3); ViewPropertyAnimator .animate(view) .setInterpolator(new AccelerateDecelerateInterpolator()) .setDuration(duration) .setStartDelay(startDelay) .rotationX(0) .translationY(0) .start(); }
/** * Lifting view * * @param view The animation target * @param baseRotation initial Rotation X in 3D space * @param fromY initial Y position of view * @param duration aniamtion duration * @param startDelay start delay before animation begin */ public static void liftingFromBottom(View view, float baseRotation, float fromY, int duration, int startDelay){ ViewHelper.setRotationX(view, baseRotation); ViewHelper.setTranslationY(view, fromY); ViewPropertyAnimator .animate(view) .setInterpolator(new AccelerateDecelerateInterpolator()) .setDuration(duration) .setStartDelay(startDelay) .rotationX(0) .translationY(0) .start(); }
.setInterpolator(new AccelerateInterpolator()) .scaleX((float) thumbnailWidth / mViewPager.getWidth()) .scaleY((float) thumbnailHeight / mViewPager.getHeight())
if (animate) { ViewPropertyAnimator.animate(img_float_btn) .setInterpolator(mInterpolator).setDuration(800) .translationY(translationY); } else {
ViewPropertyAnimator.animate(this).setInterpolator(mInterpolator) .setDuration(TRANSLATE_DURATION_MILLIS) .translationY(translationY);
ViewPropertyAnimator.animate(this).setInterpolator(mInterpolator) .setDuration(TRANSLATE_DURATION_MILLIS) .translationY(translationY);
.translationX(0) .translationY(0) .setInterpolator(new DecelerateInterpolator());