Udostępnij za pośrednictwem


View.PlaySoundEffect(SoundEffects) Method

Definition

Play a sound effect for this view.

[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

Parameters

soundConstant
SoundEffects

One of the constants defined in SoundEffectConstants.

Attributes

Remarks

Play a sound effect for this view.

The framework will play sound effects for some built in actions, such as clicking, but you may wish to play these effects in your widget, for instance, for internal navigation.

The sound effect will only be played if sound effects are enabled by the user, and #isSoundEffectsEnabled() is true.

Java documentation for android.view.View.playSoundEffect(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to