VibrationEffect.Composition.AddPrimitive Method
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.
Overloads
| Name | Description |
|---|---|
| AddPrimitive(Int32) |
Adds a haptic primitive to the end of the composition. Like AddPrimitive(Int32, Single, Int32), but with no delay and a default scale. |
| AddPrimitive(Int32, Single) |
Adds a haptic primitive to the end of the composition. Like AddPrimitive(Int32, Single, Int32), but with no delay. |
| AddPrimitive(Int32, Single, Int32) |
Adds a haptic primitive to the end of the composition. Like AddPrimitive(Int32, Single, Int32, Int32), but uses a pause as the delay type. |
| AddPrimitive(Int32, Single, Int32, Int32) |
Add a haptic primitive to the end of the current composition. |
AddPrimitive(Int32)
Adds a haptic primitive to the end of the composition. Like AddPrimitive(Int32, Single, Int32), but with no delay and a default scale.
[Android.Runtime.Register("addPrimitive", "(I)Landroid/os/VibrationEffect$Composition;", "", ApiSince=30)]
public Android.OS.VibrationEffect.Composition AddPrimitive(int primitiveId);
[<Android.Runtime.Register("addPrimitive", "(I)Landroid/os/VibrationEffect$Composition;", "", ApiSince=30)>]
member this.AddPrimitive : int -> Android.OS.VibrationEffect.Composition
Parameters
- primitiveId
- Int32
The primitive to add, as the integer value of a VibrationEffectCompositionPrimitive member.
Returns
This Composition object to enable adding multiple elements in one chain. This value cannot be null.
- Attributes
Remarks
Adds a haptic primitive to the end of the composition. Like AddPrimitive(Int32, Single, Int32), but with no delay and a default scale.
Java documentation for android.os.VibrationEffect.Composition.addPrimitive(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.
Applies to
AddPrimitive(Int32, Single)
Adds a haptic primitive to the end of the composition. Like AddPrimitive(Int32, Single, Int32), but with no delay.
[Android.Runtime.Register("addPrimitive", "(IF)Landroid/os/VibrationEffect$Composition;", "", ApiSince=30)]
public Android.OS.VibrationEffect.Composition AddPrimitive(int primitiveId, float scale);
[<Android.Runtime.Register("addPrimitive", "(IF)Landroid/os/VibrationEffect$Composition;", "", ApiSince=30)>]
member this.AddPrimitive : int * single -> Android.OS.VibrationEffect.Composition
Parameters
- primitiveId
- Int32
The primitive to add, as the integer value of a VibrationEffectCompositionPrimitive member.
- scale
- Single
The scale to apply to the intensity of the primitive. Value is between 0.0f and 1.0f inclusive
Returns
This Composition object to enable adding multiple elements in one chain. This value cannot be null.
- Attributes
Remarks
Adds a haptic primitive to the end of the composition. Like AddPrimitive(Int32, Single, Int32), but with no delay.
Java documentation for android.os.VibrationEffect.Composition.addPrimitive(int, float).
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
AddPrimitive(Int32, Single, Int32)
Adds a haptic primitive to the end of the composition. Like AddPrimitive(Int32, Single, Int32, Int32), but uses a pause as the delay type.
[Android.Runtime.Register("addPrimitive", "(IFI)Landroid/os/VibrationEffect$Composition;", "", ApiSince=30)]
public Android.OS.VibrationEffect.Composition AddPrimitive(int primitiveId, float scale, int delay);
[<Android.Runtime.Register("addPrimitive", "(IFI)Landroid/os/VibrationEffect$Composition;", "", ApiSince=30)>]
member this.AddPrimitive : int * single * int -> Android.OS.VibrationEffect.Composition
Parameters
- primitiveId
- Int32
The primitive to add, as the integer value of a VibrationEffectCompositionPrimitive member.
- scale
- Single
The scale to apply to the intensity of the primitive. Value is between 0.0f and 1.0f inclusive
- delay
- Int32
The amount of time in milliseconds to wait between the end of the last primitive and the beginning of this one (i.e. a pause in the composition). Value is 0 or greater
Returns
This Composition object to enable adding multiple elements in one chain. This value cannot be null.
- Attributes
Remarks
Adds a haptic primitive to the end of the composition. Like AddPrimitive(Int32, Single, Int32, Int32), but uses a pause as the delay type.
Java documentation for android.os.VibrationEffect.Composition.addPrimitive(int, float, 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.
Applies to
AddPrimitive(Int32, Single, Int32, Int32)
Add a haptic primitive to the end of the current composition.
[Android.Runtime.Register("addPrimitive", "(IFII)Landroid/os/VibrationEffect$Composition;", "", ApiSince=36)]
public Android.OS.VibrationEffect.Composition AddPrimitive(int primitiveId, float scale, int delay, int delayType);
[<Android.Runtime.Register("addPrimitive", "(IFII)Landroid/os/VibrationEffect$Composition;", "", ApiSince=36)>]
member this.AddPrimitive : int * single * int * int -> Android.OS.VibrationEffect.Composition
Parameters
- primitiveId
- Int32
The primitive to add, as the integer value of a VibrationEffectCompositionPrimitive member.
- scale
- Single
The scale to apply to the intensity of the primitive. Value is between 0.0f and 1.0f inclusive
- delay
- Int32
The amount of time in milliseconds to wait before playing this primitive, as defined by the given delayType . Value is 0 or greater
- delayType
- Int32
The type of delay to apply, as the integer value of a VibrationEffectCompositionDelayType member.
Returns
This Composition object to enable adding multiple elements in one chain. This value cannot be null.
- Attributes
Remarks
Add a haptic primitive to the end of the current composition.
Java documentation for android.os.VibrationEffect.Composition.addPrimitive(int, float, int, 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.