class ChainReference : HelperReference


HelperReference for Chains. Elements should be added with addChainElement

Summary

Public constructors

Public functions

Unit
addChainElement(
    id: String,
    weight: Float,
    preMargin: Float,
    postMargin: Float
)

Adds the element by the given id to the Chain.

ChainReference
bias(bias: Float)
Float
State.Chain
ChainReference

Sets the style.

Protected functions

Float
Float
Float

Protected properties

Float
HashMap<String!, Float!>

This property is deprecated.

Unintended visibility, use getPostMargin instead

HashMap<String!, Float!>

This property is deprecated.

Unintended visibility, use getPreMargin instead

HashMap<String!, Float!>

This property is deprecated.

Unintended visibility, use getWeight instead

State.Chain

Inherited functions

From androidx.constraintlayout.core.state.ConstraintReference
Unit
addCustomColor(name: String!, color: Int)
Unit
addCustomFloat(name: String!, value: Float)
ConstraintReference!
alpha(alpha: Float)
Unit

apply all the constraints attributes of the mConstraintWidget

ConstraintReference!
ConstraintReference!
baselineToBaseline(reference: Any!)
ConstraintReference!
baselineToBottom(reference: Any!)
ConstraintReference!
baselineToTop(reference: Any!)
ConstraintReference!
ConstraintReference!
bottomToBottom(reference: Any!)
ConstraintReference!
bottomToTop(reference: Any!)
ConstraintReference!
centerHorizontally(reference: Any!)
ConstraintReference!
centerVertically(reference: Any!)
ConstraintReference!
circularConstraint(reference: Any!, angle: Float, distance: Float)
ConstraintReference!
ConstraintReference!

Clears all constraints.

ConstraintReference!
ConstraintReference!
ConstraintWidget!
ConstraintReference!
end()
ConstraintReference!
endToEnd(reference: Any!)
ConstraintReference!
endToStart(reference: Any!)
Float
Facade!
Dimension!
Int
Float
Any!
Float
Float
Float
Float
Float
Float
Float
String!
Float
Float
Float
Int
Float
Any!
Dimension!
ConstraintReference!
height(dimension: Dimension!)
ConstraintReference!
ConstraintReference!
ConstraintReference!
leftToLeft(reference: Any!)
ConstraintReference!
leftToRight(reference: Any!)
ConstraintReference!
margin(marginValue: Any!)
ConstraintReference!
margin(value: Int)
ConstraintReference!
marginGone(marginGoneValue: Any!)
ConstraintReference!
marginGone(value: Int)
ConstraintReference!
ConstraintReference!
ConstraintReference!
ConstraintReference!
rightToLeft(reference: Any!)
ConstraintReference!
rightToRight(reference: Any!)
ConstraintReference!
ConstraintReference!
ConstraintReference!
ConstraintReference!
ConstraintReference!
Unit
Unit
setFacade(facade: Facade!)
ConstraintReference!
setHeight(dimension: Dimension!)
Unit
Unit
Unit
setKey(key: Any!)
Unit
setTag(tag: String!)
Unit
Unit
Unit
setView(view: Any!)
ConstraintReference!
setWidth(dimension: Dimension!)
ConstraintReference!
ConstraintReference!
startToEnd(reference: Any!)
ConstraintReference!
startToStart(reference: Any!)
ConstraintReference!
top()
ConstraintReference!
topToBottom(reference: Any!)
ConstraintReference!
topToTop(reference: Any!)
ConstraintReference!
ConstraintReference!
ConstraintReference!
Unit

Validate the constraints

ConstraintReference!
ConstraintReference!
visibility(visibility: Int)
ConstraintReference!
width(dimension: Dimension!)
From androidx.constraintlayout.core.state.HelperReference
HelperReference!
add(objects: Array<Any!>!)
Unit
Unit

Allows the derived classes to invoke the apply method in the ConstraintReference

ConstraintWidget!
HelperWidget!
State.Helper!
Unit
setHelperWidget(helperWidget: HelperWidget!)

Public constructors

ChainReference

Added in 1.1.0-alpha13
ChainReference(state: State, type: State.Helper)

Public functions

addChainElement

Added in 1.1.0-alpha13
fun addChainElement(
    id: String,
    weight: Float,
    preMargin: Float,
    postMargin: Float
): Unit

Adds the element by the given id to the Chain. The order in which the elements are added is important. It will represent the element's position in the Chain.

Parameters
id: String

Id of the element to add

weight: Float

Weight used to distribute remaining space to each element

preMargin: Float

Additional space in pixels between the added element and the previous one (if any)

postMargin: Float

Additional space in pixels between the added element and the next one (if any)

bias

Added in 1.1.0-alpha13
fun bias(bias: Float): ChainReference

getBias

Added in 1.1.0-alpha13
fun getBias(): Float

getStyle

Added in 1.1.0-alpha13
fun getStyle(): State.Chain

style

Added in 1.1.0-alpha13
fun style(style: State.Chain): ChainReference

Sets the style.

Parameters
style: State.Chain

Defines the way the chain will lay out its elements

Returns
ChainReference

This same instance

Protected functions

getPostMargin

Added in 1.1.0-alpha13
protected fun getPostMargin(id: String): Float

getPreMargin

Added in 1.1.0-alpha13
protected fun getPreMargin(id: String): Float

getWeight

Added in 1.1.0-alpha13
protected fun getWeight(id: String): Float

Protected properties

mBias

Added in 1.1.0-alpha13
protected val mBiasFloat

mMapPostMargin

Added in 1.1.0-alpha13
Deprecated in 1.1.0-alpha13
protected val mMapPostMarginHashMap<String!, Float!>

mMapPreMargin

Added in 1.1.0-alpha13
Deprecated in 1.1.0-alpha13
protected val mMapPreMarginHashMap<String!, Float!>

mMapWeights

Added in 1.1.0-alpha13
Deprecated in 1.1.0-alpha13
protected val mMapWeightsHashMap<String!, Float!>

mStyle

Added in 1.1.0-alpha13
protected val mStyleState.Chain