VibrationEffectInflater
public
final
class
VibrationEffectInflater
extends Object
| java.lang.Object | |
| ↳ | android.view.VibrationEffectInflater |
Instantiates VibrationEffect objects from Android XML resources.
Summary
Public methods | |
|---|---|
static
VibrationEffectInflater
|
from(Context context)
Obtains the |
VibrationEffect
|
inflate(int resId)
Inflates a |
Inherited methods | |
|---|---|
Public methods
from
public static VibrationEffectInflater from (Context context)
Obtains the VibrationEffectInflater associated with the given context.
| Parameters | |
|---|---|
context |
Context: The context to access resources.
This value cannot be null. |
| Returns | |
|---|---|
VibrationEffectInflater |
The VibrationEffectInflater instance.
This value cannot be null. |
inflate
public VibrationEffect inflate (int resId)
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. |
| Returns | |
|---|---|
VibrationEffect |
Parsed VibrationEffect.
This value cannot be null. |
| Throws | |
|---|---|
InflateException |
If there's an inflation error. |