@@ -15,18 +15,16 @@ Animate multiple view from one method
1515``` java
1616ViewAnimator
1717 .animate(image)
18- .translationY(- 1000 , 0 )
19- .alpha(0 ,1 )
18+ .translationY(- 1000 , 0 )
19+ .alpha(0 ,1 )
2020 .andAnimate(text)
21- .dp(). translationX(- 20 , 0 )
21+ .dp(). translationX(- 20 , 0 )
2222 .descelerate()
2323 .duration(2000 )
24-
2524 .thenAnimate(image)
26- .scale(1f ,0.5f ,1f )
25+ .scale(1f ,0.5f ,1f )
2726 .accelerate()
2827 .duration(1000 )
29-
3028 .start();
3129
3230```
@@ -70,7 +68,6 @@ Add same animation on multiples view
7068ViewAnimator
7169 .animate(image,text)
7270 .scale(0 ,1 )
73-
7471 .start();
7572```
7673
@@ -79,10 +76,8 @@ Add listeners
7976ViewAnimator
8077 .animate(image)
8178 .scale(0 ,1 )
82-
8379 .onStart(() - > {})
8480 .onStop(() - > {})
85-
8681 .start();
8782
8883```
@@ -91,46 +86,46 @@ Use DP values
9186``` java
9287ViewAnimator
9388 .animate(image)
94- .dp(). translationY(- 200 , 0 )
89+ .dp(). translationY(- 200 , 0 )
9590 .start();
9691```
9792
9893Animate Height / Width
9994``` java
10095ViewAnimator
10196 .animate(view)
102- .waitForHeight() // wait until a ViewTreeObserver notification
103- .dp(). width(100 ,200 )
104- .dp(). height(50 ,100 )
97+ .waitForHeight() // wait until a ViewTreeObserver notification
98+ .dp(). width(100 ,200 )
99+ .dp(). height(50 ,100 )
105100 .start();
106101```
107102
108103Color animations
109104``` java
110105ViewAnimator
111106 .animate(view)
112- .textColor(Color . BLACK ,Color . GREEN )
113- .backgroundColor(Color . WHITE ,Color . BLACK )
107+ .textColor(Color . BLACK ,Color . GREEN )
108+ .backgroundColor(Color . WHITE ,Color . BLACK )
114109 .start();
115110```
116111
117112Rotation animations
118113``` java
119114ViewAnimator
120115 .animate(view)
121- .rotation(360 )
116+ .rotation(360 )
122117 .start();
123118```
124119
125120Custom animations
126121``` java
127122ViewAnimator
128123 .animate(text)
129- .custom(new AnimationListener .Update<TextView > () {
130- @Override public void update (TextView view , float value ) {
131- view. setText(String . format(" %.02f" ,value));
132- }
133- }, 0 , 1 )
124+ .custom(new AnimationListener .Update<TextView > () {
125+ @Override public void update (TextView view , float value ) {
126+ view. setText(String . format(" %.02f" ,value));
127+ }
128+ }, 0 , 1 )
134129 .start();
135130```
136131
0 commit comments