Brief introduction
Animate the View;
How to use
(1) Set Center point location:
Set center point as the origin of view, upper left viewhelper.setpivotx (view, 0); Viewhelper.setpivoty (view, 0);//Set center point to Middle Point viewhelper.setpivotx (view, Target.getwidth ()/2f); Viewhelper.setpivoty (view, Target.getheight ()/2f);//Set Center to lower right viewhelper.setpivotx (view, Target.getwidth ()); Viewhelper.setpivoty (view, Target.getheight ());
(2) Set a single animation:
String name, is the name of the animation to be created, the name is fixed;//specific names are: Translationx, Translationy, ScaleX, ScaleY, Alpha, RotationX, RotationY, Rotation;//valuse is a number of values (start value, end value, increment ...) corresponding to the animation. ) Objectanimator.offloat (View, String animationname, float ... values). setduration (Duration). Start ();
(3) Set the animation collection:
1. Create animation set Animatorset set = new Animatorset ();//2. Add Animation Set.playtogether (objectanimator.offloat (View, "ScaleX", 2, 1.5f, 1). Setduration (Mduration), objectanimator.offloat (view, "ScaleY", 2, 1.5f, 1). Setduration (Mduration), Objectanimator.offloat (view, "Alpha", 0, 1). Setduration (Mduration * 3/2));//3. Turn on animation Set.start ();
jar--nineoldandroids-2.4.0