Best code examples for Android ViewPropertyAnimator class (android.view.ViewPropertyAnimator)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android ViewPropertyAnimator class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Android ViewPropertyAnimator examples from Open Source projects
This code example shows how to use the following methods: alpha, setDuration, setStartDelay
This code example shows how to use the following methods: alpha, scaleX, scaleY, setDuration, setInterpolator
    /** Creates the open/close animation */ 
    private void animateScale(boolean isExitAnimation, final Runnable onAnimationEndRunnable) {
        mChild.setPivotX(mTargetScreen.centerX() - mChild.getLeft());
        mChild.setPivotY(mTargetScreen.centerY() - mChild.getTop());
        ViewPropertyAnimator animator = mChild.animate();
        animator.setDuration(mAnimationDuration);
        final int scaleInterpolator = isExitAnimation ? android.R.interpolator.accelerate_quint
                : android.R.interpolator.decelerate_quint;
        animator.setInterpolator(AnimationUtils.loadInterpolator(getContext(), scaleInterpolator));
        final float scaleTarget = isExitAnimation ? 0.5f : 1.0f;
        animator.scaleX(scaleTarget);
        animator.scaleY(scaleTarget);
        animator.alpha(isExitAnimation ? 0.0f : 1.0f);
 
        if (onAnimationEndRunnable != null) {
            animator.setListener(new AnimatorListener() {
                @Override 
                public void onAnimationStart(Animator animation) {}
 
                @Override 
                public void onAnimationRepeat(Animator animation) {}
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: cancel
    } 
 
    @Override 
    public void cancel() { 
        if (mViewPropertyAnimator != null) {
            mViewPropertyAnimator.cancel();
        } 
    } 
 
    @Override 
    public Animator clone() {
        throw new RuntimeException("Not implemented");
    } 
 
    @Override 
    public void end() { 
        throw new RuntimeException("Not implemented");
    } 
 
    @Override 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: alpha, cancel, setDuration, setListener
This code example shows how to use the following methods: alpha, cancel, setDuration, setListener
Related Android ViewPropertyAnimator Questions & Answers:
See Code Examples for Android ViewPropertyAnimator Methods: