VibrationEffect.Preset.Create 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 |
|---|---|
| Create(VibrationEffectPresetType) |
Creates a new haptic Preset with the specified ID. |
| Create(VibrationEffectPresetType, Single) |
Creates a new haptic Preset with the specified ID and scale. |
Create(VibrationEffectPresetType)
Creates a new haptic Preset with the specified ID.
[Android.Runtime.Register("create", "(I)Landroid/os/VibrationEffect$Preset;", "", ApiSince=37)]
public static Android.OS.VibrationEffect.Preset Create(Android.OS.VibrationEffectPresetType presetId);
[<Android.Runtime.Register("create", "(I)Landroid/os/VibrationEffect$Preset;", "", ApiSince=37)>]
static member Create : Android.OS.VibrationEffectPresetType -> Android.OS.VibrationEffect.Preset
Parameters
- presetId
- VibrationEffectPresetType
The ID of the preset to create. Value is one of the following: PRESET_CLICK; PRESET_TICK; PRESET_LOW_TICK
Returns
The created Preset. This value cannot be null.
- Attributes
Remarks
Creates a new haptic Preset with the specified ID.
Android reference for android.os.VibrationEffect.Preset.create.
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
Create(VibrationEffectPresetType, Single)
Creates a new haptic Preset with the specified ID and scale.
[Android.Runtime.Register("create", "(IF)Landroid/os/VibrationEffect$Preset;", "", ApiSince=37)]
public static Android.OS.VibrationEffect.Preset Create(Android.OS.VibrationEffectPresetType presetId, float scale);
[<Android.Runtime.Register("create", "(IF)Landroid/os/VibrationEffect$Preset;", "", ApiSince=37)>]
static member Create : Android.OS.VibrationEffectPresetType * single -> Android.OS.VibrationEffect.Preset
Parameters
- presetId
- VibrationEffectPresetType
The ID of the preset to create. Value is one of the following: PRESET_CLICK; PRESET_TICK; PRESET_LOW_TICK
- scale
- Single
The scale to apply to the preset's intensity, ranging from 0 to 1. Value is between 0.0f and 1.0f inclusive
Returns
The created Preset. This value cannot be null.
- Attributes
Remarks
Creates a new haptic Preset with the specified ID and scale.
Android reference for android.os.VibrationEffect.Preset.create.
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.