Function

alignByBaseline

Aligns this layout with sibling layouts in a Row by their shared baseline.

alignByBaseline

Source set: JvmAndAndroid
public fun RemoteModifier.alignByBaseline(): RemoteModifier

Aligns this layout with sibling layouts in a Row by their shared baseline.

This modifier is used to align layouts within a Row based on their first baseline. It is particularly useful for aligning text-based elements to ensure their baselines match up, creating a visually consistent layout.

This is the remote equivalent of the Modifier.alignByBaseline() modifier in Jetpack Compose.

Example usage within a remote Row:

RemoteRow(
modifier = RemoteModifier.fillMaxWidth()
) {
RemoteText(
text = "First".rs,
modifier = RemoteModifier.alignByBaseline()
)
RemoteText(
text = "Second".rs,
modifier = RemoteModifier.alignByBaseline()
)
}

Return

a RemoteModifier that aligns the layout by its first baseline

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: