Fraction

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

Sizes the column to a fraction of the table's maximum width constraint.

Note that this defaults to 0 if the maximum width constraints is infinite.

Summary

Public constructors

<init>(fraction: Float)

Sizes the column to a fraction of the table's maximum width constraint.

Public methods

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

Returns the ideal width of the column.

Inherited functions

Public constructors

<init>

Fraction(fraction: Float)

Sizes the column to a fraction of the table's maximum width constraint.

Note that this defaults to 0 if the maximum width constraints is infinite.

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.