Språk

VibrationEffect.Events Property

Definition

Returns a list of VibrationEffect.Events that make up this effect.

public abstract System.Collections.Generic.IList<Android.OS.VibrationEffect.Event> Events { [Android.Runtime.Register("getEvents", "()Ljava/util/List;", "GetGetEventsHandler", ApiSince=37)] get; }
[<get: Android.Runtime.Register("getEvents", "()Ljava/util/List;", "GetGetEventsHandler", ApiSince=37)>]
member this.Events : System.Collections.Generic.IList<Android.OS.VibrationEffect.Event>

Property Value

A list of events. This value cannot be null.

Attributes

Remarks

Returns a list of VibrationEffect.Events that make up this effect. This effect must NOT be a repeating effect.

This method is used to retrieve the constituent events from a VibrationEffect, primarily for use with VibrationEffect.Builder.

If this effect was created via the Composition API, then each primitive will be converted into an event. The start time for each event is calculated using the primitive delay and an estimated duration for all preceding primitives. These estimates are based on the recommended primitive duration targets from Android Haptics Constants. The estimates used are: - 12ms for Composition.PRIMITIVE_CLICK, - 5ms for Composition.PRIMITIVE_TICK, - 12ms for Composition.PRIMITIVE_LOW_TICK, - 500ms for Composition.PRIMITIVE_SLOW_RISE, - 150ms for Composition.PRIMITIVE_QUICK_RISE, - 100ms for Composition.PRIMITIVE_QUICK_FALL, - 300ms for Composition.PRIMITIVE_THUD, - 150ms for Composition.PRIMITIVE_SPIN.

Actual primitive durations may differ between devices.

Android reference for android.os.VibrationEffect.getEvents.

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.

Applies to