Wrap

object Wrap : TableColumnWidth.Inflexible
kotlin.Any
   ↳ androidx.ui.layout.TableColumnWidth
   ↳ androidx.ui.layout.TableColumnWidth.Inflexible
   ↳ androidx.ui.layout.TableColumnWidth.Wrap

Sizes the column to the width of the widest child in that column.

Note that in order to compute their preferred widths, the children will be measured with infinite width constraints, which means that some of them may have infinite width. For a wrap content behaviour that avoids this, use MinIntrinsicWidth or MaxIntrinsicWidth.

Summary

Public methods

IntPx
maxIntrinsicWidth(cells: List<TableMeasurable>, containerWidth: IntPx, density: Density, availableHeight: IntPx)

Returns the minimum intrinsic width of the column for the given height.

IntPx
minIntrinsicWidth(cells: List<TableMeasurable>, containerWidth: IntPx, density: Density, availableHeight: IntPx)

Returns the minimum intrinsic width of the column for the given height.

IntPx
preferredWidth(cells: List<TableMeasurable>, containerWidth: IntPx, density: Density)

Returns the ideal width of the column.

Inherited functions

Public methods

maxIntrinsicWidth

fun maxIntrinsicWidth(
    cells: List<TableMeasurable>,
    containerWidth: IntPx,
    density: Density,
    availableHeight: IntPx
): IntPx

Returns the minimum intrinsic width of the column for the given height.

This is used for computing the table's intrinsic dimensions. Defaults to preferredWidth.

minIntrinsicWidth

fun minIntrinsicWidth(
    cells: List<TableMeasurable>,
    containerWidth: IntPx,
    density: Density,
    availableHeight: IntPx
): IntPx

Returns the minimum intrinsic width of the column for the given height.

This is used for computing the table's intrinsic dimensions. Defaults to preferredWidth.

preferredWidth

fun preferredWidth(
    cells: List<TableMeasurable>,
    containerWidth: IntPx,
    density: Density
): IntPx

Returns the ideal width of the column.

Note that the column might be wider than this if it is flexible.