@@ -226,15 +226,17 @@ public synchronized void setState(@State int state) {
226226 mSummaryColorAnimator .setDuration (mAnimationDuration );
227227 mSummaryColorAnimator .start ();
228228
229- if (mPointAnimator != null ) mPointAnimator .cancel ();
230- mPointAnimator = mPointFrame .animate ().alpha (0F ).setDuration (mAnimationDuration );
231- mPointAnimator .start ();
232- mErrorIconView .setScaleX (0.6F );
233- mErrorIconView .setScaleY (0.6F );
234- if (mErrorIconAnimator != null ) mErrorIconAnimator .cancel ();
235- mErrorIconAnimator = mErrorIconView .animate ().scaleX (1F ).scaleY (1F )
236- .alpha (1F ).setDuration (mAnimationDuration ).setInterpolator (new OvershootInterpolator ());
237- mErrorIconAnimator .start ();
229+ if (mErrorIconView .getAlpha () < 1F ) {
230+ if (mPointAnimator != null ) mPointAnimator .cancel ();
231+ mPointAnimator = mPointFrame .animate ().alpha (0F ).setDuration (mAnimationDuration );
232+ mPointAnimator .start ();
233+ mErrorIconView .setScaleX (0.6F );
234+ mErrorIconView .setScaleY (0.6F );
235+ if (mErrorIconAnimator != null ) mErrorIconAnimator .cancel ();
236+ mErrorIconAnimator = mErrorIconView .animate ().scaleX (1F ).scaleY (1F )
237+ .alpha (1F ).setDuration (mAnimationDuration ).setInterpolator (new OvershootInterpolator ());
238+ mErrorIconAnimator .start ();
239+ }
238240 } else {
239241 if (mSummaryColorAnimator != null ) mSummaryColorAnimator .cancel ();
240242 mSummaryColorAnimator = ObjectAnimator
@@ -243,14 +245,16 @@ public synchronized void setState(@State int state) {
243245 mSummaryColorAnimator .setDuration (mAnimationDuration );
244246 mSummaryColorAnimator .start ();
245247
246- mPointFrame .setScaleX (0.6F );
247- mPointFrame .setScaleY (0.6F );
248- if (mPointAnimator != null ) mPointAnimator .cancel ();
249- mPointAnimator = mPointFrame .animate ().scaleX (1F ).scaleY (1F ).alpha (1F ).setDuration (mAnimationDuration );
250- mPointAnimator .start ();
251- if (mErrorIconAnimator != null ) mErrorIconAnimator .cancel ();
252- mErrorIconAnimator = mErrorIconView .animate ().alpha (0F ).setDuration (mAnimationDuration );
253- mErrorIconAnimator .start ();
248+ if (mPointFrame .getAlpha () < 1F ) {
249+ mPointFrame .setScaleX (0.6F );
250+ mPointFrame .setScaleY (0.6F );
251+ if (mPointAnimator != null ) mPointAnimator .cancel ();
252+ mPointAnimator = mPointFrame .animate ().scaleX (1F ).scaleY (1F ).alpha (1F ).setDuration (mAnimationDuration );
253+ mPointAnimator .start ();
254+ if (mErrorIconAnimator != null ) mErrorIconAnimator .cancel ();
255+ mErrorIconAnimator = mErrorIconView .animate ().alpha (0F ).setDuration (mAnimationDuration );
256+ mErrorIconAnimator .start ();
257+ }
254258 }
255259
256260 // Set the visibility of views
0 commit comments