Språk

VibrationEffect.Builder.AddEvents Method

Definition

Adds a list of existing Events to the composition.

[Android.Runtime.Register("addEvents", "(JLjava/util/List;)Landroid/os/VibrationEffect$Builder;", "", ApiSince=37)]
public Android.OS.VibrationEffect.Builder AddEvents(long startTimeShiftMillis, System.Collections.Generic.IList<Android.OS.VibrationEffect.Event> events);
[<Android.Runtime.Register("addEvents", "(JLjava/util/List;)Landroid/os/VibrationEffect$Builder;", "", ApiSince=37)>]
member this.AddEvents : int64 * System.Collections.Generic.IList<Android.OS.VibrationEffect.Event> -> Android.OS.VibrationEffect.Builder

Parameters

startTimeShiftMillis
Int64

The non-negative time in milliseconds to add to the start time of each event in the provided list. Value is a non-negative duration in milliseconds.

events
IList<VibrationEffect.Event>

The list of events to add. This value cannot be null.

Returns

This Builder object. This value cannot be null.

Attributes

Remarks

Adds a list of existing Events to the composition.

For example, if an event within the list has a start time of 50ms, and startTimeShiftMillis is 100ms, the event will be shifted to start at 150ms within this builder's timeline.

All events will be added and validated according to the builder's timing rules, with best-effort checks to prevent overlaps being introduced by the shift.

You can get events by calling VibrationEffect.getEvents() on non-repeating effects.

Android reference for android.os.VibrationEffect.Builder.addEvents.

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