@@ -32,15 +32,15 @@ public class AnimatedStripedDrawable extends Drawable implements Animatable {
3232 private float alpha = Constants .STRIPE_ALPHA ;
3333 private float cornerRadius = Constants .CORNER ;
3434 private int duration = Constants .DURATION ;
35- private float tilt = Constants .TILT ;
35+ private float tilt = Constants .STRIPE_TILT ;
36+ private boolean stripeRevert = Constants .REVERT ;
37+ private boolean showStripes = Constants .SHOW_STRIPES ;
3638
3739 private float density ;
3840 private int viewHeight ;
3941 private int viewWidth ;
4042 private float tiltLeft = 0f ;
4143 private float tiltRight = 0f ;
42- private boolean stripeRevert = false ;
43- private boolean showStripes = true ;
4444 private boolean running = false ;
4545
4646 private Context context ;
@@ -212,6 +212,7 @@ public float getStripeWidth() {
212212
213213 public AnimatedStripedDrawable setStripeWidth (float stripeWidth ) {
214214 this .stripeWidth = stripeWidth ;
215+ invalidateSelf ();
215216 return this ;
216217 }
217218
@@ -221,6 +222,7 @@ public int getColorBack() {
221222
222223 public AnimatedStripedDrawable setColorBack (int colorBack ) {
223224 this .colorBack = colorBack ;
225+ invalidateSelf ();
224226 return this ;
225227 }
226228
@@ -230,6 +232,7 @@ public int getColorMain() {
230232
231233 public AnimatedStripedDrawable setColorMain (int colorMain ) {
232234 this .colorMain = colorMain ;
235+ invalidateSelf ();
233236 return this ;
234237 }
235238
@@ -239,6 +242,7 @@ public int getColorSub() {
239242
240243 public AnimatedStripedDrawable setColorSub (int colorSub ) {
241244 this .colorSub = colorSub ;
245+ invalidateSelf ();
242246 return this ;
243247 }
244248
@@ -248,6 +252,7 @@ public float getStripeAlpha() {
248252
249253 public AnimatedStripedDrawable setStripeAlpha (float alpha ) {
250254 this .alpha = alpha ;
255+ invalidateSelf ();
251256 return this ;
252257 }
253258
@@ -257,6 +262,7 @@ public float getCornerRadius() {
257262
258263 public AnimatedStripedDrawable setCornerRadius (float cornerRadius ) {
259264 this .cornerRadius = cornerRadius ;
265+ invalidateSelf ();
260266 return this ;
261267 }
262268
@@ -266,6 +272,7 @@ public int getDuration() {
266272
267273 public AnimatedStripedDrawable setDuration (int duration ) {
268274 this .duration = duration ;
275+ invalidateSelf ();
269276 return this ;
270277 }
271278
@@ -275,6 +282,7 @@ public float getTilt() {
275282
276283 public AnimatedStripedDrawable setTilt (float tilt ) {
277284 this .tilt = tilt ;
285+ invalidateSelf ();
278286 return this ;
279287 }
280288
@@ -284,6 +292,7 @@ public boolean isStripeRevert() {
284292
285293 public AnimatedStripedDrawable setStripeRevert (boolean stripeRevert ) {
286294 this .stripeRevert = stripeRevert ;
295+ invalidateSelf ();
287296 return this ;
288297 }
289298
@@ -293,6 +302,7 @@ public boolean isShowStripes() {
293302
294303 public AnimatedStripedDrawable setShowStripes (boolean showStripes ) {
295304 this .showStripes = showStripes ;
305+ invalidateSelf ();
296306 return this ;
297307 }
298308}
0 commit comments