Max

data class Max : TableColumnWidth.Inflexible
kotlin.Any
   ↳ androidx.ui.layout.TableColumnWidth
   ↳ androidx.ui.layout.TableColumnWidth.Inflexible
   ↳ androidx.ui.layout.TableColumnWidth.Max

Sizes the column to the size that is the maximum of two column width specifications.

Both specifications are evaluated, so if either specification is expensive, so is this.

Summary

Public constructors

Sizes the column to the size that is the maximum of two column width specifications.

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 constructors

<init>

Max(
    a: TableColumnWidth.Inflexible,
    b: TableColumnWidth.Inflexible)

Sizes the column to the size that is the maximum of two column width specifications.

Both specifications are evaluated, so if either specification is expensive, so is this.

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.