View.PlaySoundEffect(SoundEffects) 方法

定义

为此视图播放声音效果。

[Android.Runtime.Register("playSoundEffect", "(I)V", "GetPlaySoundEffect_IHandler")]
public virtual void PlaySoundEffect (Android.Views.SoundEffects soundConstant);
[<Android.Runtime.Register("playSoundEffect", "(I)V", "GetPlaySoundEffect_IHandler")>]
abstract member PlaySoundEffect : Android.Views.SoundEffects -> unit
override this.PlaySoundEffect : Android.Views.SoundEffects -> unit

参数

soundConstant
SoundEffects

SoundEffectConstants定义的常量之一。

属性

注解

为此视图播放声音效果。

框架将为某些内置操作(如单击)播放声音效果,但你可能希望在小组件中播放这些效果,例如,用于内部导航。

仅当用户启用声音效果且为 true 时, #isSoundEffectsEnabled() 才会播放声音效果。

android.view.View.playSoundEffect(int)Java 文档。

此页面的某些部分是基于 创建和共享的工作进行的修改,并根据 署名许可中所述的条款使用。

适用于