Skip to main content

class RowDensity

Source

When a list drops to the compact row.

The breakpoint lives here rather than in each view, because a breakpoint the caller and the view both hold is a breakpoint that disagrees with itself. The view answers the question with its own height on every resize.

Functions​

apply​

public bool apply(int viewHeight)

Answers the breakpoint for a view of the given height. Returns true when the density changed, so a caller can re-lay out only then.

compactBelow​

public int compactBelow()

Source

setCompact​

public void setCompact(bool compact)

Source

Sets the density directly, for a caller that has already decided.

compact​

public bool compact()

Source

setCompactBelow​

public void setCompactBelow(int height)

Below this height the rows become compact. Zero disables the switch.