Flex

data class Flex : TableColumnWidth
kotlin.Any
   ↳ androidx.ui.layout.TableColumnWidth
   ↳ androidx.ui.layout.TableColumnWidth.Flex

Sizes the column by taking a part of the remaining space according to flex once all the inflexible columns have been measured. Note that this defaults to 0 if no space is available.

Summary

Public constructors

<init>(flex: Float)

Sizes the column by taking a part of the remaining space according to flex once all the inflexible columns have been measured.

Public methods

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

Returns the ideal width of the column.

Inherited functions

Public constructors

<init>

Flex(flex: Float)

Sizes the column by taking a part of the remaining space according to flex once all the inflexible columns have been measured. Note that this defaults to 0 if no space is available.

Public methods

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.