ContainedVoiceInputIndicator
Functions summary
Unit |
@ComposableA voice input indicator with a background container that displays sound activity to the user. |
Functions
ContainedVoiceInputIndicator
@Composable
fun ContainedVoiceInputIndicator(
level: () -> Float,
modifier: Modifier = Modifier,
backgroundColor: Color = GlimmerTheme.colors.primary
): Unit
A voice input indicator with a background container that displays sound activity to the user. In this version of the component, the indicator bars are transparent and cut through its background container.
This component can be used when accepting voice input to show that the app is listening to the user's input. The indicator responds to the level provided, showing a visual representation of the audio intensity.
See VoiceInputIndicator for the version of this component with solid indicator bars and no background container.
import androidx.compose.runtime.Composable import androidx.xr.glimmer.VoiceInputIndicator // Get audio input from microphone. // Normalize audio input to level 0...1 // Pass normalized level to Composable. VoiceInputIndicator(level = { level })