Interface

SoundEffect

Interface representing the capability to play sound effects on user interaction.

Source set: Common
public interface SoundEffect

Interface representing the capability to play sound effects on user interaction.

This is used primarily to play interaction sound effects for click gestures.

Functions

playClickSound

Source set: Common
public fun playClickSound()

Plays a click sound effect.

This method triggers the standard click sound effect, provided it is supported by the platform, enabled by the user's system, and has not been silenced or customized via SoundEffectOnInteraction.

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: