use of android.animation.Animator in project Launcher3 by chislon.
the class LauncherViewPropertyAnimator method onAnimationRepeat.
@Override
public void onAnimationRepeat(Animator animation) {
for (int i = 0; i < mListeners.size(); i++) {
Animator.AnimatorListener listener = mListeners.get(i);
listener.onAnimationRepeat(this);
}
}
use of android.animation.Animator in project Launcher3 by chislon.
the class LauncherViewPropertyAnimator method onAnimationEnd.
@Override
public void onAnimationEnd(Animator animation) {
for (int i = 0; i < mListeners.size(); i++) {
Animator.AnimatorListener listener = mListeners.get(i);
listener.onAnimationEnd(this);
}
mRunning = false;
}
use of android.animation.Animator in project kickmaterial by byoutline.
the class CategoriesListActivity method runFinishAnimation.
private void runFinishAnimation(Runnable finishAction) {
if (summaryScrolledValue > 0) {
binding.categoriesRv.smoothScrollToPosition(0);
}
ViewUtils.showView(binding.selectCategoryTv, false);
ObjectAnimator imageFade = ObjectAnimator.ofFloat(binding.selectedCategoryIv, View.ALPHA, 1, 0);
AnimatorSet set = new AnimatorSet();
AnimatorSet closeButtonScale = AnimatorUtils.getScaleAnimator(binding.closeCategoriesIv, 1, 0.1f);
set.playTogether(closeButtonScale, imageFade);
set.setDuration(FINISH_ANIMATION_DURATION);
set.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
if (revealAnimation != null) {
revealAnimation.cancel();
}
ViewUtils.showView(binding.categoryCircleRevealIv, false);
binding.closeCategoriesIv.setScaleX(0);
binding.closeCategoriesIv.setScaleY(0);
finishAction.run();
}
});
binding.categoriesRv.startAnimation(LUtils.loadAnimationWithLInterpolator(getApplicationContext(), R.anim.slide_to_bottom));
set.start();
}
use of android.animation.Animator in project cw-omnibus by commonsguy.
the class AsyncDemoFragment method changeMenuIconAnimation.
// based on https://goo.gl/3IUM8K
private void changeMenuIconAnimation(final FloatingActionMenu menu) {
AnimatorSet set = new AnimatorSet();
final ImageView v = menu.getMenuIconView();
ObjectAnimator scaleOutX = ObjectAnimator.ofFloat(v, "scaleX", 1.0f, 0.2f);
ObjectAnimator scaleOutY = ObjectAnimator.ofFloat(v, "scaleY", 1.0f, 0.2f);
ObjectAnimator scaleInX = ObjectAnimator.ofFloat(v, "scaleX", 0.2f, 1.0f);
ObjectAnimator scaleInY = ObjectAnimator.ofFloat(v, "scaleY", 0.2f, 1.0f);
scaleOutX.setDuration(50);
scaleOutY.setDuration(50);
scaleInX.setDuration(150);
scaleInY.setDuration(150);
scaleInX.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationStart(Animator animation) {
v.setImageResource(menu.isOpened() ? R.drawable.ic_action_settings : R.drawable.ic_close);
}
});
set.play(scaleOutX).with(scaleOutY);
set.play(scaleInX).with(scaleInY).after(scaleOutX);
set.setInterpolator(new OvershootInterpolator(2));
menu.setIconToggleAnimatorSet(set);
}
use of android.animation.Animator in project UltimateAndroid by cymcsg.
the class DetailActivity3 method animateRevealShow.
private void animateRevealShow(View viewRoot) {
int cx = (viewRoot.getLeft() + viewRoot.getRight()) / 2;
int cy = (viewRoot.getTop() + viewRoot.getBottom()) / 2;
int finalRadius = Math.max(viewRoot.getWidth(), viewRoot.getHeight());
Animator anim = ViewAnimationUtils.createCircularReveal(viewRoot, cx, cy, 0, finalRadius);
viewRoot.setVisibility(View.VISIBLE);
anim.setDuration(ANIM_DURATION);
anim.start();
}
Aggregations