Serializable, Comparable<SoundPlayer.SoundType>public static enum SoundPlayer.SoundType extends Enum<SoundPlayer.SoundType>
This enumeration describes audio playback effects in SoundPlayer.
SystemCapability.Multimedia#AUDIO| 枚举常量 | 说明 |
|---|---|
KEY_CLICK |
Indicates the keyboard tapping sound.
|
KEYPRESS_DELETE |
Indicates the sound when the Delete key is pressed.
|
KEYPRESS_INVALID |
Indicates the sound when an invalid key is pressed.
|
KEYPRESS_RETURN |
Indicates the sound when the Back key is pressed.
|
KEYPRESS_SPACEBAR |
Indicates the sound when the Spacebar key is pressed.
|
KEYPRESS_STANDARD |
Indicates the standard keypress sound.
|
NAVIGATION_DOWN |
Indicates the sound when the down arrow key is pressed.
|
NAVIGATION_LEFT |
Indicates the sound when the left arrow key is pressed.
|
NAVIGATION_RIGHT |
Indicates the sound when the right arrow key is pressed.
|
NAVIGATION_UP |
Indicates the sound when the up arrow key is pressed.
|
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
int |
getTypeValue() |
Obtains an enum value.
|
static SoundPlayer.SoundType |
valueOf(String name) |
返回带有指定名称的该类型的枚举常量。
字符串必须与用于声明该类型的枚举常量的
标识符完全匹配。(不允许有多余
的空格字符。)
|
static SoundPlayer.SoundType[] |
values() |
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。该方法可用于迭代
常量, 如下所示:
for (SoundPlayer.SoundType c : SoundPlayer.SoundType.values()) System.out.println(c); |
public static final SoundPlayer.SoundType KEY_CLICK
public static final SoundPlayer.SoundType NAVIGATION_UP
public static final SoundPlayer.SoundType NAVIGATION_DOWN
public static final SoundPlayer.SoundType NAVIGATION_LEFT
public static final SoundPlayer.SoundType NAVIGATION_RIGHT
public static final SoundPlayer.SoundType KEYPRESS_STANDARD
public static final SoundPlayer.SoundType KEYPRESS_SPACEBAR
public static final SoundPlayer.SoundType KEYPRESS_DELETE
public static final SoundPlayer.SoundType KEYPRESS_RETURN
public static final SoundPlayer.SoundType KEYPRESS_INVALID
public static SoundPlayer.SoundType[] values()
for (SoundPlayer.SoundType c : SoundPlayer.SoundType.values()) System.out.println(c);
public static SoundPlayer.SoundType valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值public int getTypeValue()