Back to project page Calma.
The source code is released under:
Apache License
If you think the Android project Calma listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.espian.showcaseview.utils; // ww w . j av a 2s .co m import android.graphics.Point; import com.espian.showcaseview.ShowcaseView; import com.nineoldandroids.animation.Animator; import com.nineoldandroids.animation.AnimatorSet; import com.nineoldandroids.animation.ObjectAnimator; public class PointAnimator { public static Animator ofPoints(Object object, String xMethod, String yMethod, Point... values) { AnimatorSet set = new AnimatorSet(); int[] xValues = new int[values.length]; int[] yValues = new int[values.length]; for (int i = 0; i < values.length; i++) { xValues[i] = values[i].x; yValues[i] = values[i].y; } ObjectAnimator xAnimator = ObjectAnimator.ofInt(object, xMethod, xValues); ObjectAnimator yAnimator = ObjectAnimator.ofInt(object, yMethod, yValues); set.playTogether(xAnimator, yAnimator); return set; } public static Animator ofPoints(ShowcaseView showcaseView, Point... values) { return ofPoints(showcaseView, "showcaseX", "showcaseY", values); } }