AnimatedImageDrawable.RepeatCount Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Retrieve the number of times the animation will repeat. -or- Specify the number of times to repeat the animation.
public virtual int RepeatCount { [Android.Runtime.Register("getRepeatCount", "()I", "GetGetRepeatCountHandler", ApiSince=28)] get; [Android.Runtime.Register("setRepeatCount", "(I)V", "GetSetRepeatCount_IHandler", ApiSince=28)] set; }
[<get: Android.Runtime.Register("getRepeatCount", "()I", "GetGetRepeatCountHandler", ApiSince=28)>]
[<set: Android.Runtime.Register("setRepeatCount", "(I)V", "GetSetRepeatCount_IHandler", ApiSince=28)>]
member this.RepeatCount : int with get, set
Property Value
- Attributes
Remarks
Property getter documentation:
Retrieve the number of times the animation will repeat.
By default, the repeat count in the encoded data is respected. If the value is #REPEAT_INFINITE
, the animation will repeat as long as it is displayed. If the value is 0
, it will play once.
Calling #setRepeatCount
will make future calls to this method return the value passed to #setRepeatCount
.
Java documentation for android.graphics.drawable.AnimatedImageDrawable.getRepeatCount()
.
Property setter documentation:
Specify the number of times to repeat the animation.
By default, the repeat count in the encoded data is respected. If set to #REPEAT_INFINITE
, the animation will repeat as long as it is displayed. If the value is 0
, the animation will play once.
This call replaces the current repeat count. If the encoded data specified a repeat count of 2
(meaning that #getRepeatCount()
returns 2
, the animation will play three times. Calling setRepeatCount(1)
will result in playing only twice and #getRepeatCount()
returning 1
.
If the animation is already playing, the iterations that have already occurred count towards the new count. If the animation has already repeated the appropriate number of times (or more), it will finish its current iteration and then stop.
Java documentation for android.graphics.drawable.AnimatedImageDrawable.setRepeatCount(int)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.