use of android.view.animation.AccelerateInterpolator in project ViewAnimator by florent37.
the class ViewAnimatorMainActivity method animateSequentially.
protected void animateSequentially() {
ViewAnimator.animate(image).dp().width(100f, 150f).alpha(1, 0.1f).interpolator(new DecelerateInterpolator()).duration(800).thenAnimate(image).dp().width(150f, 100f).alpha(0.1f, 1f).interpolator(new AccelerateInterpolator()).duration(1200).start();
ViewAnimator.animate(image).scaleX(0, 1).scaleY(0, 1).alpha(0, 1).decelerate().duration(500).thenAnimate(image).scaleX(1, 0).scaleY(1, 0).alpha(1, 0).accelerate().duration(500);
}
use of android.view.animation.AccelerateInterpolator in project WilliamChart by diogobernardino.
the class StackedCardThree method dismiss.
@Override
public void dismiss(Runnable action) {
super.dismiss(action);
mChart.dismiss(mChart.getChartAnimation().setInterpolator(new AccelerateInterpolator()).withEndAction(action));
}
use of android.view.animation.AccelerateInterpolator in project WilliamChart by diogobernardino.
the class StackedCardTwo method dismiss.
@Override
public void dismiss(Runnable action) {
super.dismiss(action);
mChart.dismiss(new Animation().setDuration(2500).setInterpolator(new AccelerateInterpolator()).withEndAction(action));
}
use of android.view.animation.AccelerateInterpolator in project WilliamChart by diogobernardino.
the class StackedCardTwo method show.
@Override
public void show(Runnable action) {
super.show(action);
BarSet barSet = new BarSet(mLabels, mValues[0]);
barSet.setColor(Color.parseColor("#90ee7e"));
mChart.addData(barSet);
barSet = new BarSet(mLabels, mValues[1]);
barSet.setColor(Color.parseColor("#2b908f"));
mChart.addData(barSet);
Paint gridPaint = new Paint();
gridPaint.setColor(Color.parseColor("#e7e7e7"));
gridPaint.setStyle(Paint.Style.STROKE);
gridPaint.setAntiAlias(true);
gridPaint.setStrokeWidth(Tools.fromDpToPx(.7f));
mChart.setStep(1).setGrid(0, 10, gridPaint).setLabelsFormat(new DecimalFormat("##'M'")).show(new Animation().setDuration(2500).setInterpolator(new AccelerateInterpolator()).withEndAction(action));
}
use of android.view.animation.AccelerateInterpolator in project platform_packages_apps_launcher by android.
the class DeleteZone method createAnimations.
private void createAnimations() {
if (mInAnimation == null) {
mInAnimation = new FastAnimationSet();
final AnimationSet animationSet = mInAnimation;
animationSet.setInterpolator(new AccelerateInterpolator());
animationSet.addAnimation(new AlphaAnimation(0.0f, 1.0f));
if (mOrientation == ORIENTATION_HORIZONTAL) {
animationSet.addAnimation(new TranslateAnimation(Animation.ABSOLUTE, 0.0f, Animation.ABSOLUTE, 0.0f, Animation.RELATIVE_TO_SELF, 1.0f, Animation.RELATIVE_TO_SELF, 0.0f));
} else {
animationSet.addAnimation(new TranslateAnimation(Animation.RELATIVE_TO_SELF, 1.0f, Animation.RELATIVE_TO_SELF, 0.0f, Animation.ABSOLUTE, 0.0f, Animation.ABSOLUTE, 0.0f));
}
animationSet.setDuration(ANIMATION_DURATION);
}
if (mHandleInAnimation == null) {
if (mOrientation == ORIENTATION_HORIZONTAL) {
mHandleInAnimation = new TranslateAnimation(Animation.ABSOLUTE, 0.0f, Animation.ABSOLUTE, 0.0f, Animation.RELATIVE_TO_SELF, 1.0f, Animation.RELATIVE_TO_SELF, 0.0f);
} else {
mHandleInAnimation = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 1.0f, Animation.RELATIVE_TO_SELF, 0.0f, Animation.ABSOLUTE, 0.0f, Animation.ABSOLUTE, 0.0f);
}
mHandleInAnimation.setDuration(ANIMATION_DURATION);
}
if (mOutAnimation == null) {
mOutAnimation = new FastAnimationSet();
final AnimationSet animationSet = mOutAnimation;
animationSet.setInterpolator(new AccelerateInterpolator());
animationSet.addAnimation(new AlphaAnimation(1.0f, 0.0f));
if (mOrientation == ORIENTATION_HORIZONTAL) {
animationSet.addAnimation(new FastTranslateAnimation(Animation.ABSOLUTE, 0.0f, Animation.ABSOLUTE, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 1.0f));
} else {
animationSet.addAnimation(new FastTranslateAnimation(Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 1.0f, Animation.ABSOLUTE, 0.0f, Animation.ABSOLUTE, 0.0f));
}
animationSet.setDuration(ANIMATION_DURATION);
}
if (mHandleOutAnimation == null) {
if (mOrientation == ORIENTATION_HORIZONTAL) {
mHandleOutAnimation = new FastTranslateAnimation(Animation.ABSOLUTE, 0.0f, Animation.ABSOLUTE, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 1.0f);
} else {
mHandleOutAnimation = new FastTranslateAnimation(Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 1.0f, Animation.ABSOLUTE, 0.0f, Animation.ABSOLUTE, 0.0f);
}
mHandleOutAnimation.setFillAfter(true);
mHandleOutAnimation.setDuration(ANIMATION_DURATION);
}
}
Aggregations