Class Direct
- java.lang.Object
-
- androidx.constraintlayout.core.widgets.analyzer.Direct
-
public class Direct extends java.lang.ObjectDirect 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.
-
-
Constructor Summary
Constructors Constructor Description Direct()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Stringls(int level)Small utility function to indent logs depending on the levelstatic booleansolveChain(ConstraintWidgetContainer container, LinearSystem system, int orientation, int offset, ChainHead chainHead, boolean isChainSpread, boolean isChainSpreadInside, boolean isChainPacked)Try to directly resolve the chainstatic voidsolvingPass(ConstraintWidgetContainer layout, BasicMeasure.Measurer measurer)Walk the dependency graph and solves it.
-
-
-
Method Detail
-
solvingPass
public static void solvingPass(ConstraintWidgetContainer layout, BasicMeasure.Measurer measurer)
Walk the dependency graph and solves it.- Parameters:
layout- the container we want to optimizemeasurer- the measurer used to measure the widget
-
ls
public static java.lang.String ls(int level)
Small utility function to indent logs depending on the level- Returns:
- a formatted string for the indentation
-
solveChain
public static boolean solveChain(ConstraintWidgetContainer container, LinearSystem system, int orientation, int offset, ChainHead chainHead, boolean isChainSpread, boolean isChainSpreadInside, boolean isChainPacked)
Try to directly resolve the chain- Returns:
- true if fully resolved
-
-