語言

VibrationEffect.Composition.DelayTypeRelativeStartOffset 欄位

定義

警告

This constant will be removed in the future version. Use Android.OS.VibrationEffectCompositionDelayType enum directly instead of this field.

延遲表示在開始此原語前,相對於合成中前一個原語的起始時間,產生一個偏移量。

[Android.Runtime.Register("DELAY_TYPE_RELATIVE_START_OFFSET", ApiSince=36)]
[System.Obsolete("This constant will be removed in the future version. Use Android.OS.VibrationEffectCompositionDelayType enum directly instead of this field.", true)]
public const Android.OS.VibrationEffectCompositionDelayType DelayTypeRelativeStartOffset = 1;
[<Android.Runtime.Register("DELAY_TYPE_RELATIVE_START_OFFSET", ApiSince=36)>]
[<System.Obsolete("This constant will be removed in the future version. Use Android.OS.VibrationEffectCompositionDelayType enum directly instead of this field.", true)>]
val mutable DelayTypeRelativeStartOffset : Android.OS.VibrationEffectCompositionDelayType

欄位值

Value = 1
屬性

備註

延遲表示在開始此原語前,相對於合成中前一個原語的起始時間,產生一個偏移量。

原意會從上一個原語開始後指定的固定時間開始,與該原語在裝置硬體上的實際持續時間無關。 這能精確掌握作品中原語的時間點,確保它們能在所需的間隔被演奏。 舉個例子:

VibrationEffect.startComposition()
                    .addPrimitive(PRIMITIVE_CLICK, 1.0)
                    .addPrimitive(PRIMITIVE_TICK, 1.0, 20, DELAY_TYPE_RELATIVE_START_OFFSET)
                    .addPrimitive(PRIMITIVE_THUD, 1.0, 80, DELAY_TYPE_RELATIVE_START_OFFSET)
                    .compose()

裝置上的操作將如下:

0ms               20ms                     100ms
             PRIMITIVE_CLICK---PRIMITIVE_TICK-----------PRIMITIVE_THUD

如果原件與先前的原件重疊,則會從組合中刪除。

Java 文件 android.os.VibrationEffect.Composition.DELAY_TYPE_RELATIVE_START_OFFSET。

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

適用於