Search in sources :

Example 16 with OvershootInterpolator

use of android.view.animation.OvershootInterpolator in project MusicDNA by harjot-oberai.

the class ViewArtistFragment method onResume.

@Override
public void onResume() {
    super.onResume();
    new Handler().postDelayed(new Runnable() {

        @Override
        public void run() {
            playAllfab.animate().scaleX(1.0f).scaleY(1.0f).setDuration(300).setInterpolator(new OvershootInterpolator());
        }
    }, 500);
}
Also used : OvershootInterpolator(android.view.animation.OvershootInterpolator) Handler(android.os.Handler)

Example 17 with OvershootInterpolator

use of android.view.animation.OvershootInterpolator in project MusicDNA by harjot-oberai.

the class LocalMusicFragment method onResume.

@Override
public void onResume() {
    super.onResume();
    mLayoutManager2.scrollToPositionWithOffset(0, 0);
    new Handler().postDelayed(new Runnable() {

        @Override
        public void run() {
            shuffleFab.animate().scaleX(1.0f).scaleY(1.0f).setDuration(300).setInterpolator(new OvershootInterpolator());
        }
    }, 500);
}
Also used : OvershootInterpolator(android.view.animation.OvershootInterpolator) Handler(android.os.Handler)

Example 18 with OvershootInterpolator

use of android.view.animation.OvershootInterpolator in project MusicDNA by harjot-oberai.

the class FolderContentFragment method onResume.

@Override
public void onResume() {
    super.onResume();
    mLayoutManager2.scrollToPositionWithOffset(0, 0);
    new Handler().postDelayed(new Runnable() {

        @Override
        public void run() {
            playAllFAB.animate().scaleX(1.0f).scaleY(1.0f).setDuration(300).setInterpolator(new OvershootInterpolator());
        }
    }, 500);
}
Also used : OvershootInterpolator(android.view.animation.OvershootInterpolator) Handler(android.os.Handler)

Example 19 with OvershootInterpolator

use of android.view.animation.OvershootInterpolator in project InstaMaterial by frogermcs.

the class SendingProgressView method setupDoneAnimators.

private void setupDoneAnimators() {
    doneBgAnimator = ObjectAnimator.ofFloat(this, "currentDoneBgOffset", MAX_DONE_BG_OFFSET, 0).setDuration(300);
    doneBgAnimator.setInterpolator(new DecelerateInterpolator());
    checkmarkAnimator = ObjectAnimator.ofFloat(this, "currentCheckmarkOffset", MAX_DONE_IMG_OFFSET, 0).setDuration(300);
    checkmarkAnimator.setInterpolator(new OvershootInterpolator());
    checkmarkAnimator.addListener(new AnimatorListenerAdapter() {

        @Override
        public void onAnimationEnd(Animator animation) {
            changeState(STATE_FINISHED);
        }
    });
}
Also used : DecelerateInterpolator(android.view.animation.DecelerateInterpolator) ObjectAnimator(android.animation.ObjectAnimator) Animator(android.animation.Animator) OvershootInterpolator(android.view.animation.OvershootInterpolator) AnimatorListenerAdapter(android.animation.AnimatorListenerAdapter)

Example 20 with OvershootInterpolator

use of android.view.animation.OvershootInterpolator in project android-floating-action-button by futuresimple.

the class FloatingActionsMenu method createAddButton.

private void createAddButton(Context context) {
    mAddButton = new AddFloatingActionButton(context) {

        @Override
        void updateBackground() {
            mPlusColor = mAddButtonPlusColor;
            mColorNormal = mAddButtonColorNormal;
            mColorPressed = mAddButtonColorPressed;
            mStrokeVisible = mAddButtonStrokeVisible;
            super.updateBackground();
        }

        @Override
        Drawable getIconDrawable() {
            final RotatingDrawable rotatingDrawable = new RotatingDrawable(super.getIconDrawable());
            mRotatingDrawable = rotatingDrawable;
            final OvershootInterpolator interpolator = new OvershootInterpolator();
            final ObjectAnimator collapseAnimator = ObjectAnimator.ofFloat(rotatingDrawable, "rotation", EXPANDED_PLUS_ROTATION, COLLAPSED_PLUS_ROTATION);
            final ObjectAnimator expandAnimator = ObjectAnimator.ofFloat(rotatingDrawable, "rotation", COLLAPSED_PLUS_ROTATION, EXPANDED_PLUS_ROTATION);
            collapseAnimator.setInterpolator(interpolator);
            expandAnimator.setInterpolator(interpolator);
            mExpandAnimation.play(expandAnimator);
            mCollapseAnimation.play(collapseAnimator);
            return rotatingDrawable;
        }
    };
    mAddButton.setId(R.id.fab_expand_menu_button);
    mAddButton.setSize(mAddButtonSize);
    mAddButton.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View v) {
            toggle();
        }
    });
    addView(mAddButton, super.generateDefaultLayoutParams());
    mButtonsCount++;
}
Also used : OvershootInterpolator(android.view.animation.OvershootInterpolator) ObjectAnimator(android.animation.ObjectAnimator) LayerDrawable(android.graphics.drawable.LayerDrawable) Drawable(android.graphics.drawable.Drawable) TextView(android.widget.TextView) View(android.view.View)

Aggregations

OvershootInterpolator (android.view.animation.OvershootInterpolator)78 ObjectAnimator (android.animation.ObjectAnimator)30 Animator (android.animation.Animator)21 AnimatorSet (android.animation.AnimatorSet)15 View (android.view.View)15 AnimatorListenerAdapter (android.animation.AnimatorListenerAdapter)14 AccelerateInterpolator (android.view.animation.AccelerateInterpolator)12 Handler (android.os.Handler)11 ValueAnimator (android.animation.ValueAnimator)10 LinearInterpolator (android.view.animation.LinearInterpolator)10 DecelerateInterpolator (android.view.animation.DecelerateInterpolator)8 TextView (android.widget.TextView)7 Drawable (android.graphics.drawable.Drawable)6 AccelerateDecelerateInterpolator (android.view.animation.AccelerateDecelerateInterpolator)6 PropertyValuesHolder (android.animation.PropertyValuesHolder)5 Rect (android.graphics.Rect)5 LayerDrawable (android.graphics.drawable.LayerDrawable)5 Interpolator (android.view.animation.Interpolator)5 Point (android.graphics.Point)4 Animation (android.view.animation.Animation)4