Added in API level 10000
VibrationEffectInflater
class VibrationEffectInflater
| kotlin.Any | |
| ↳ | android.view.VibrationEffectInflater |
Instantiates VibrationEffect objects from Android XML resources.
Summary
| Public methods | |
|---|---|
| static VibrationEffectInflater |
Obtains the |
| VibrationEffect |
Inflates a |
Public methods
from
Added in API level 10000
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
Added in API level 10000
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. |