class StateSet


Summary

Constants

const String!
TAG = "ConstraintLayoutStates"

Public constructors

StateSet(context: Context!, parser: XmlPullParser!)

Parse a StateSet

Public functions

Int
convertToConstraintSet(
    currentConstrainSettId: Int,
    stateId: Int,
    width: Float,
    height: Float
)

converts a state to a constraintSet

Boolean
needsToChange(id: Int, width: Float, height: Float)

will the layout need to change

Unit
setOnConstraintsChanged(
    constraintsChangedListener: ConstraintsChangedListener!
)

listen for changes in constraintSet

Int
stateGetConstraintID(id: Int, width: Int, height: Int)

Get the constraint id for a state

Int
updateConstraints(currentId: Int, id: Int, width: Float, height: Float)

Update the Constraints

Constants

TAG

Added in 2.2.0-alpha13
const val TAG = "ConstraintLayoutStates": String!

Public constructors

StateSet

Added in 2.2.0-alpha13
StateSet(context: Context!, parser: XmlPullParser!)

Parse a StateSet

Parameters
context: Context!
parser: XmlPullParser!

Public functions

convertToConstraintSet

Added in 2.2.0-alpha13
fun convertToConstraintSet(
    currentConstrainSettId: Int,
    stateId: Int,
    width: Float,
    height: Float
): Int

converts a state to a constraintSet

Parameters
currentConstrainSettId: Int
stateId: Int
width: Float
height: Float
Returns
Int

needsToChange

Added in 2.2.0-alpha13
fun needsToChange(id: Int, width: Float, height: Float): Boolean

will the layout need to change

Parameters
id: Int
width: Float
height: Float
Returns
Boolean

setOnConstraintsChanged

Added in 2.2.0-alpha13
fun setOnConstraintsChanged(
    constraintsChangedListener: ConstraintsChangedListener!
): Unit

listen for changes in constraintSet

Parameters
constraintsChangedListener: ConstraintsChangedListener!

stateGetConstraintID

Added in 2.2.0-alpha13
fun stateGetConstraintID(id: Int, width: Int, height: Int): Int

Get the constraint id for a state

Parameters
id: Int
width: Int
height: Int
Returns
Int

updateConstraints

Added in 2.2.0-alpha13
fun updateConstraints(currentId: Int, id: Int, width: Float, height: Float): Int

Update the Constraints

Parameters
currentId: Int
id: Int
width: Float
height: Float
Returns
Int