Guideline
public class Guideline extends ConstraintWidget
| java.lang.Object | ||
| ↳ | androidx.constraintlayout.core.widgets.ConstraintWidget | |
| ↳ | androidx.constraintlayout.core.widgets.Guideline |
Guideline
Summary
Constants |
|
|---|---|
static final int |
HORIZONTAL = 0 |
static final int |
RELATIVE_BEGIN = 1 |
static final int |
RELATIVE_END = 2 |
static final int |
RELATIVE_PERCENT = 0 |
static final int |
RELATIVE_UNKNOWN = -1 |
static final int |
VERTICAL = 1 |
Protected fields |
|
|---|---|
boolean |
|
int |
|
int |
|
float |
Public constructors |
|---|
Public methods |
|
|---|---|
void |
addToSolver(LinearSystem system, boolean optimize)Add this widget to the solver |
boolean |
Returns true if this widget should be used in a barrier |
void |
copy( |
void |
|
ConstraintAnchor |
|
ConstraintAnchor |
getAnchor(ConstraintAnchor.Type anchorType)Given a type of anchor, returns the corresponding anchor. |
int |
Get the Minimum Position |
int |
get the orientation VERTICAL or HORIZONTAL |
int |
|
int |
|
int |
|
float |
|
String |
getType()Specify the xml type for the container |
boolean |
|
boolean |
|
boolean |
|
void |
setFinalValue(int position) |
void |
setGuideBegin(int value) |
void |
setGuideEnd(int value) |
void |
setGuidePercent(float value) |
void |
setGuidePercent(int value) |
void |
setMinimumPosition(int minimum)set the minimum position |
void |
setOrientation(int orientation) |
void |
updateFromSolver(LinearSystem system, boolean optimize)Update the widget from the values generated by the solver |
Inherited Constants |
||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Inherited fields |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Inherited methods |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Constants
Protected fields
Public methods
addToSolver
public void addToSolver(LinearSystem system, boolean optimize)
Add this widget to the solver
| Parameters | |
|---|---|
LinearSystem system |
the solver we want to add the widget to |
boolean optimize |
true if |
allowedInBarrier
public boolean allowedInBarrier()
Returns true if this widget should be used in a barrier
getAnchor
public ConstraintAnchor getAnchor(ConstraintAnchor.Type anchorType)
Given a type of anchor, returns the corresponding anchor.
| Parameters | |
|---|---|
ConstraintAnchor.Type anchorType |
type of the anchor (LEFT, TOP, RIGHT, BOTTOM, BASELINE, CENTER_X, CENTER_Y) |
| Returns | |
|---|---|
ConstraintAnchor |
the matching anchor |
getMinimumPosition
public int getMinimumPosition()
Get the Minimum Position
| Returns | |
|---|---|
int |
the Minimum Position |
getOrientation
public int getOrientation()
get the orientation VERTICAL or HORIZONTAL
| Returns | |
|---|---|
int |
orientation |
setMinimumPosition
public void setMinimumPosition(int minimum)
set the minimum position
| Parameters | |
|---|---|
int minimum |
updateFromSolver
public void updateFromSolver(LinearSystem system, boolean optimize)
Update the widget from the values generated by the solver
| Parameters | |
|---|---|
LinearSystem system |
the solver we get the values from. |
boolean optimize |
true if |