此项为 API 级别 XE12 中的新增配置
特定于 Glass 的音效的额外常量。
此组使用特定于 Glass 的声音扩展现有的 AudioManager
常量。
常规用法
如需播放声音,请调用 playSoundEffect(int)
并提供所需的声音。例如,如需播放 TAP
声音,请执行以下操作:
AudioManager audio = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); audio.playSoundEffect(Sounds.TAP);
常量 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | 已禁止 | 用户尝试执行了不允许的操作。 | |||||||||
int | 已停用 | 用户忽略了一项内容。 | |||||||||
int | ERROR | 出现错误。 | |||||||||
int | 已选择 | 已选择 1 项内容。 | |||||||||
int | 成功 | 操作成功完成。 | |||||||||
int | TAP | 用户点按了相应内容。 |
继承的方法 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
常量
此项为 API 级别 XE12 中的新增配置
public static final int DISALLOWED
此项为 API 级别 XE12 中的新增配置
public static final int DISMISSED
此项为 API 级别 XE12 中的新增配置