Composable Function

RemoteCollapsibleRow

A collapsible row layout that organizes its children horizontally.

RemoteCollapsibleRowSample

@Sampled
@PreviewWrapper(RemoteComponentPreviewWrapper::class)
@Composable
public fun RemoteCollapsibleRowSample() {
    // A row with fixed width, children exceed this width.
    RemoteCollapsibleRow(
        modifier = RemoteModifier.height(200.rdp).width(150.rdp).background(Color.LightGray.rc)
    ) {
        // Child 1: No explicit priority (Default: Float.MAX_VALUE - Highest)
        RemoteBox(
            modifier = RemoteModifier.width(100.rdp).height(200.rdp).background(Color.Red.rc)
        ) {
            RemoteText("Required".rs)
        }

        // Child 2: Low priority (1f)
        RemoteBox(
            modifier =
                RemoteModifier.collapsiblePriority(1f)
                    .width(100.rdp)
                    .height(200.rdp)
                    .background(Color.Blue.rc)
        ) {
            RemoteText("Low".rs)
        }

        // Child 3: Medium priority (5f)
        RemoteBox(
            modifier =
                RemoteModifier.collapsiblePriority(5f)
                    .width(100.rdp)
                    .height(200.rdp)
                    .background(Color.Green.rc)
        ) {
            RemoteText("Medium".rs)
        }
    }
}
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: