use of android.view.animation.OvershootInterpolator in project ViewAnimator by florent37.
the class MainActivity method animateParallel.
protected void animateParallel() {
final ViewAnimator viewAnimator = ViewAnimator.animate(mountain, image).dp().translationY(-1000, 0).alpha(0, 1).singleInterpolator(new OvershootInterpolator()).andAnimate(percent).scale(0, 1).andAnimate(text).textColor(Color.BLACK, Color.WHITE).backgroundColor(Color.WHITE, Color.BLACK).waitForHeight().singleInterpolator(new AccelerateDecelerateInterpolator()).duration(2000).thenAnimate(percent).custom(new AnimationListener.Update<TextView>() {
@Override
public void update(TextView view, float value) {
view.setText(String.format(Locale.US, "%.02f%%", value));
}
}, 0, 1).andAnimate(image).rotation(0, 360).duration(5000).start();
new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
@Override
public void run() {
viewAnimator.cancel();
}
}, 3000);
}
use of android.view.animation.OvershootInterpolator in project InstaMaterial by frogermcs.
the class PublishActivity method loadThumbnailPhoto.
private void loadThumbnailPhoto() {
ivPhoto.setScaleX(0);
ivPhoto.setScaleY(0);
Picasso.with(this).load(photoUri).centerCrop().resize(photoSize, photoSize).into(ivPhoto, new Callback() {
@Override
public void onSuccess() {
ivPhoto.animate().scaleX(1.f).scaleY(1.f).setInterpolator(new OvershootInterpolator()).setDuration(400).setStartDelay(200).start();
}
@Override
public void onError() {
}
});
}
use of android.view.animation.OvershootInterpolator in project ListenerMusicPlayer by hefuyicoder.
the class LyricView method smoothScrollTo.
/**
* 从当前位置滑动到指定位置上
* @param toY 指定纵坐标位置
* */
private void smoothScrollTo(float toY) {
final ValueAnimator animator = ValueAnimator.ofFloat(mScrollY, toY);
animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator animation) {
if (mUserTouch) {
animator.cancel();
return;
}
mScrollY = (float) animation.getAnimatedValue();
invalidateView();
}
});
animator.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationStart(Animator animation) {
super.onAnimationStart(animation);
mSliding = true;
}
@Override
public void onAnimationEnd(Animator animation) {
super.onAnimationEnd(animation);
mSliding = false;
measureCurrentLine();
invalidateView();
}
});
animator.setDuration(640);
animator.setInterpolator(new OvershootInterpolator(0.5f));
animator.start();
}
use of android.view.animation.OvershootInterpolator in project MusicDNA by harjot-oberai.
the class NewPlaylistFragment method onResume.
@Override
public void onResume() {
super.onResume();
mLayoutManager2.scrollToPositionWithOffset(0, 0);
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
savePlaylist.animate().scaleX(1.0f).scaleY(1.0f).setDuration(300).setInterpolator(new OvershootInterpolator());
}
}, 500);
}
use of android.view.animation.OvershootInterpolator in project MusicDNA by harjot-oberai.
the class RecentsFragment 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);
}
Aggregations