語言

AnimatedImageDrawable.RepeatCount 屬性

定義

取得該動畫會重複的次數。 -或- 指定重複動畫的次數。

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

屬性值

屬性

備註

財產取得者文件:

取得該動畫會重複的次數。

預設情況下,編碼資料中的重複計數會被尊重。 如果值為 #REPEAT_INFINITE,只要顯示動畫就會重複。 如果值是 0,則會播放一次。

呼叫 #setRepeatCount 此方法後,將回傳傳給 #setRepeatCount的值。

Java 文件 android.graphics.drawable.AnimatedImageDrawable.getRepeatCount()。

屬性設定文件:

指定重複動畫的次數。

預設情況下,編碼資料中的重複計數會被尊重。 若設定為 #REPEAT_INFINITE,動畫會持續播放。 如果值為 0,動畫會播放一次。

此通話取代目前的重複計數。 若編碼資料指定重複次數為 2 (意即 #getRepeatCount() 回傳 2,動畫將播放三次。 叫牌 setRepeatCount(1) 只會出兩次,然後 #getRepeatCount() 返回 1。

如果動畫已經在播放,已經發生的迭代會計入新的重複次數。 如果動畫已經重複了適當次數(或更多),它會完成當前的迭代後停止。

Java 文件 android.graphics.drawable.AnimatedImageDrawable.setRepeatCount(int)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於