class Direct


Direct resolution engine This walks through the graph of dependencies and infer final position. This allows us to skip the linear solver in many situations, as well as skipping intermediate measure passes. Widgets are solved independently in horizontal and vertical. Any widgets not fully resolved will be computed later on by the linear solver.

Summary

Public constructors

Public functions

java-static String!
ls(level: Int)

Small utility function to indent logs depending on the level

java-static Boolean
solveChain(
    container: ConstraintWidgetContainer!,
    system: LinearSystem!,
    orientation: Int,
    offset: Int,
    chainHead: ChainHead!,
    isChainSpread: Boolean,
    isChainSpreadInside: Boolean,
    isChainPacked: Boolean
)

Try to directly resolve the chain

java-static Unit
solvingPass(
    layout: ConstraintWidgetContainer!,
    measurer: BasicMeasure.Measurer!
)

Walk the dependency graph and solves it.

Public constructors

Direct

Added in 1.1.0-alpha13
Direct()

Public functions

ls

Added in 1.1.0-alpha13
java-static fun ls(level: Int): String!

Small utility function to indent logs depending on the level

Returns
String!

a formatted string for the indentation

solveChain

Added in 1.1.0-alpha13
java-static fun solveChain(
    container: ConstraintWidgetContainer!,
    system: LinearSystem!,
    orientation: Int,
    offset: Int,
    chainHead: ChainHead!,
    isChainSpread: Boolean,
    isChainSpreadInside: Boolean,
    isChainPacked: Boolean
): Boolean

Try to directly resolve the chain

Returns
Boolean

true if fully resolved

solvingPass

Added in 1.1.0-alpha13
java-static fun solvingPass(
    layout: ConstraintWidgetContainer!,
    measurer: BasicMeasure.Measurer!
): Unit

Walk the dependency graph and solves it.

Parameters
layout: ConstraintWidgetContainer!

the container we want to optimize

measurer: BasicMeasure.Measurer!

the measurer used to measure the widget