ReactiveGuide

public class ReactiveGuide
extends View implements SharedValues.SharedValuesListener

java.lang.Object
   ↳ android.view.View
     ↳ androidx.constraintlayout.widget.ReactiveGuide


Utility class representing a reactive Guideline helper object for ConstraintLayout.

Summary

Inherited constants

Inherited fields

Public constructors

ReactiveGuide(Context context)
ReactiveGuide(Context context, AttributeSet attrs)
ReactiveGuide(Context context, AttributeSet attrs, int defStyleAttr)
ReactiveGuide(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)

Public methods

int getApplyToConstraintSetId()
int getAttributeId()
boolean isAnimatingChange()
void onNewValue(int key, int newValue, int oldValue)
void setAnimateChange(boolean animate)
void setApplyToConstraintSetId(int id)
void setAttributeId(int id)
void setGuidelineBegin(int margin)

Set the guideline's distance from the top or left edge.

void setGuidelineEnd(int margin)

Set a guideline's distance to end.

void setGuidelinePercent(float ratio)

Set a Guideline's percent.

Inherited methods

Public constructors

ReactiveGuide

public ReactiveGuide (Context context)

Parameters
context Context

ReactiveGuide

public ReactiveGuide (Context context, 
                AttributeSet attrs)

Parameters
context Context

attrs AttributeSet

ReactiveGuide

public ReactiveGuide (Context context, 
                AttributeSet attrs, 
                int defStyleAttr)

Parameters
context Context

attrs AttributeSet

defStyleAttr int

ReactiveGuide

public ReactiveGuide (Context context, 
                AttributeSet attrs, 
                int defStyleAttr, 
                int defStyleRes)

Parameters
context Context

attrs AttributeSet

defStyleAttr int

defStyleRes int

Public methods

getApplyToConstraintSetId

public int getApplyToConstraintSetId ()

Returns
int

getAttributeId

public int getAttributeId ()

Returns
int

isAnimatingChange

public boolean isAnimatingChange ()

Returns
boolean

onNewValue

public void onNewValue (int key, 
                int newValue, 
                int oldValue)

Parameters
key int

newValue int

oldValue int

setAnimateChange

public void setAnimateChange (boolean animate)

Parameters
animate boolean

setApplyToConstraintSetId

public void setApplyToConstraintSetId (int id)

Parameters
id int

setAttributeId

public void setAttributeId (int id)

Parameters
id int

setGuidelineBegin

public void setGuidelineBegin (int margin)

Set the guideline's distance from the top or left edge.

Parameters
margin int: the distance to the top or left edge

setGuidelineEnd

public void setGuidelineEnd (int margin)

Set a guideline's distance to end.

Parameters
margin int: the margin to the right or bottom side of container

setGuidelinePercent

public void setGuidelinePercent (float ratio)

Set a Guideline's percent.

Parameters
ratio float: the ratio between the gap on the left and right 0.0 is top/left 0.5 is middle