다음을 통해 공유


VibrationEffect.CreatePredefined(Int32) Method

Definition

Create a predefined vibration effect.

[Android.Runtime.Register("createPredefined", "(I)Landroid/os/VibrationEffect;", "", ApiSince=29)]
public static Android.OS.VibrationEffect CreatePredefined (int effectId);
[<Android.Runtime.Register("createPredefined", "(I)Landroid/os/VibrationEffect;", "", ApiSince=29)>]
static member CreatePredefined : int -> Android.OS.VibrationEffect

Parameters

effectId
Int32

The ID of the effect to perform: #EFFECT_CLICK, #EFFECT_DOUBLE_CLICK, #EFFECT_TICK

Returns

The desired effect.

Attributes

Remarks

Create a predefined vibration effect.

Predefined effects are a set of common vibration effects that should be identical, regardless of the app they come from, in order to provide a cohesive experience for users across the entire device. They also may be custom tailored to the device hardware in order to provide a better experience than you could otherwise build using the generic building blocks.

This will fallback to a generic pattern if one exists and there does not exist a hardware-specific implementation of the effect.

Java documentation for android.os.VibrationEffect.createPredefined(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