RemoteRow

Functions summary

Unit
@RemoteComposable
@Composable
RemoteRow(
    modifier: RemoteModifier,
    horizontalArrangement: RemoteArrangement.Horizontal,
    verticalAlignment: RemoteAlignment.Vertical,
    content: @Composable RemoteRowScope.() -> Unit
)

A layout composable that positions its children in a horizontal sequence.

Functions

@RemoteComposable
@Composable
fun RemoteRow(
    modifier: RemoteModifier = RemoteModifier,
    horizontalArrangement: RemoteArrangement.Horizontal = RemoteArrangement.Start,
    verticalAlignment: RemoteAlignment.Vertical = RemoteAlignment.Top,
    content: @Composable RemoteRowScope.() -> Unit
): Unit

A layout composable that positions its children in a horizontal sequence.

RemoteRow allows you to arrange children horizontally and control their horizontalArrangement (spacing) and verticalAlignment.

import androidx.compose.remote.creation.compose.layout.RemoteArrangement
import androidx.compose.remote.creation.compose.layout.RemoteRow
import androidx.compose.remote.creation.compose.layout.RemoteText
import androidx.compose.remote.creation.compose.state.rc
import androidx.compose.remote.creation.compose.state.rdp
import androidx.compose.remote.creation.compose.state.rs
import androidx.compose.ui.graphics.Color

RemoteRow(horizontalArrangement = RemoteArrangement.spacedBy(8.rdp)) {
    RemoteText("Item A".rs, color = Color.Red.rc)
    RemoteText("Item B".rs, color = Color.Green.rc)
    RemoteText("Item C".rs, color = Color.Blue.rc)
}
import androidx.compose.remote.creation.compose.layout.RemoteBox
import androidx.compose.remote.creation.compose.layout.RemoteRow
import androidx.compose.remote.creation.compose.modifier.RemoteModifier
import androidx.compose.remote.creation.compose.modifier.background
import androidx.compose.remote.creation.compose.modifier.width
import androidx.compose.remote.creation.compose.state.rc
import androidx.compose.remote.creation.compose.state.rdp
import androidx.compose.ui.graphics.Color

RemoteRow(modifier = RemoteModifier.width(200.rdp)) {
    RemoteBox(modifier = RemoteModifier.weight(1f).background(Color.Red.rc))
    RemoteBox(modifier = RemoteModifier.weight(2f).background(Color.Blue.rc))
}
Parameters
modifier: RemoteModifier = RemoteModifier

The modifier to be applied to this row.

horizontalArrangement: RemoteArrangement.Horizontal = RemoteArrangement.Start

The horizontal arrangement of the children.

verticalAlignment: RemoteAlignment.Vertical = RemoteAlignment.Top

The vertical alignment of the children.

content: @Composable RemoteRowScope.() -> Unit

The content of the row, which has access to RemoteRowScope.