RemoteButtonGroup

Functions summary

Unit
@Composable
@RemoteComposable
RemoteButtonGroup(
    modifier: RemoteModifier,
    spacing: RemoteDp,
    contentPadding: RemotePaddingValues,
    verticalAlignment: RemoteAlignment.Vertical,
    content: @RemoteComposable @Composable RemoteRowScope.() -> Unit
)

Layout component to implement an expressive group of buttons in a row.

Functions

@Composable
@RemoteComposable
fun RemoteButtonGroup(
    modifier: RemoteModifier = RemoteModifier,
    spacing: RemoteDp = RemoteButtonGroupDefaults.Spacing,
    contentPadding: RemotePaddingValues = RemoteButtonGroupDefaults.fullWidthPaddings(),
    verticalAlignment: RemoteAlignment.Vertical = RemoteAlignment.CenterVertically,
    content: @RemoteComposable @Composable RemoteRowScope.() -> Unit
): Unit

Layout component to implement an expressive group of buttons in a row.

Example of 3 buttons, the middle one bigger:

import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Call
import androidx.compose.material.icons.filled.Favorite
import androidx.compose.material.icons.filled.MailOutline
import androidx.compose.remote.creation.compose.modifier.RemoteModifier
import androidx.compose.remote.creation.compose.modifier.fillMaxWidth
import androidx.wear.compose.remote.material3.RemoteButtonGroup

RemoteButtonGroup(modifier = modifier.fillMaxWidth()) {
    Button(Icons.Filled.MailOutline, RemoteModifier.weight(1f))
    Button(Icons.Filled.Favorite, RemoteModifier.weight(1f))
    Button(Icons.Filled.Call, RemoteModifier.weight(1f))
}
Parameters
modifier: RemoteModifier = RemoteModifier

Modifier to be applied to the button group

spacing: RemoteDp = RemoteButtonGroupDefaults.Spacing

the amount of spacing between buttons

contentPadding: RemotePaddingValues = RemoteButtonGroupDefaults.fullWidthPaddings()

The spacing values to apply internally between the container and the content

verticalAlignment: RemoteAlignment.Vertical = RemoteAlignment.CenterVertically

the vertical alignment of the button group's children.

content: @RemoteComposable @Composable RemoteRowScope.() -> Unit

the content and properties of each button. The Ux guidance is to use no more than 3 buttons within a ButtonGroup.