Bug:
73529437
Test: Ic818bbf1091d12631aedd6475d225fa4a708b29c
Change-Id: I4807409895a057e775bfee5dea407e8dc1af94be
in the encoded data. Setting this to infinite (-1) will result in the
animation repeating as long as it is displayed (once start() is called). -->
<attr name="repeatCount"/>
+ <!-- When true, automatically start animating. The default is false, meaning
+ that the animation will not start until start() is called. -->
+ <attr name="autoStart" />
</declare-styleable>
<!-- Drawable used to draw bitmaps. -->
if (repeatCount != REPEAT_UNDEFINED) {
this.setRepeatCount(repeatCount);
}
+
+ boolean autoStart = a.getBoolean(
+ R.styleable.AnimatedImageDrawable_autoStart, false);
+ if (autoStart && mState.mNativePtr != 0) {
+ this.start();
+ }
}
/**