VibrationEffectInflater


class VibrationEffectInflater
kotlin.Any
   ↳ android.view.VibrationEffectInflater

Instantiates VibrationEffect objects from Android XML resources.

Summary

Public methods
static VibrationEffectInflater
from(context: Context)

Obtains the VibrationEffectInflater associated with the given context.

VibrationEffect
inflate(resId: Int)

Inflates a VibrationEffect from an Android XML resource containing a vibration pattern (e.g., stored inside

Public methods

from

static fun from(context: Context): VibrationEffectInflater

Obtains the VibrationEffectInflater associated with the given context.

Parameters
context Context: The context to access resources.
This value cannot be null.
Return
VibrationEffectInflater The VibrationEffectInflater instance.
This value cannot be null.

inflate

fun inflate(resId: Int): VibrationEffect

Inflates a VibrationEffect from an Android XML resource containing a vibration pattern (e.g., stored inside res/xml/).

For dynamic vibration patterns, see VibrationEffect.parseFromXml.

Parameters
resId Int: The resource ID containing the vibration XML pattern.
Return
VibrationEffect Parsed VibrationEffect.
This value cannot be null.
Exceptions
android.view.InflateException If there's an inflation error.