The second Android 11 Developer Preview is now available, test it out and share your feedback.

Fill

@Stable object Fill : LayoutModifier
kotlin.Any
   ↳ androidx.ui.layout.LayoutWidth.Fill

Modifies the width of a Compose UI layout element to fill all available space.

This modifies the incoming Constraints provided by a layout element's parent. If the incoming constraints do not allow the modified size, the incoming constraints from the parent will restrict the final size.

Example usage:


//Unresolved: androidx.ui.layout.samples.SimpleFillWidthModifier

Summary

Public methods

Constraints
Density.modifyConstraints(constraints: Constraints, layoutDirection: LayoutDirection)

Modifies constraints for performing measurement of the modified layout element.

Inherited functions

Public methods

modifyConstraints

fun Density.modifyConstraints(
    constraints: Constraints,
    layoutDirection: LayoutDirection
): Constraints

Modifies constraints for performing measurement of the modified layout element.