StateSet
public class StateSet
Summary
Public constructors |
|---|
StateSet(Context context, XmlPullParser parser)Parse a StateSet |
Public methods |
|
|---|---|
int |
convertToConstraintSet(converts a state to a constraintSet |
boolean |
needsToChange(int id, float width, float height)will the layout need to change |
void |
setOnConstraintsChanged(listen for changes in constraintSet |
int |
stateGetConstraintID(int id, int width, int height)Get the constraint id for a state |
int |
updateConstraints(int currentId, int id, float width, float height)Update the Constraints |
Public constructors
StateSet
Added in 2.2.1
public StateSet(Context context, XmlPullParser parser)
Parse a StateSet
| Parameters | |
|---|---|
Context context |
|
XmlPullParser parser |
Public methods
convertToConstraintSet
Added in 2.2.1
public int convertToConstraintSet(
int currentConstrainSettId,
int stateId,
float width,
float height
)
converts a state to a constraintSet
| Parameters | |
|---|---|
int currentConstrainSettId |
|
int stateId |
|
float width |
|
float height |
| Returns | |
|---|---|
int |
needsToChange
Added in 2.2.1
public boolean needsToChange(int id, float width, float height)
will the layout need to change
| Parameters | |
|---|---|
int id |
|
float width |
|
float height |
| Returns | |
|---|---|
boolean |
setOnConstraintsChanged
Added in 2.2.1
public void setOnConstraintsChanged(
ConstraintsChangedListener constraintsChangedListener
)
listen for changes in constraintSet
| Parameters | |
|---|---|
ConstraintsChangedListener constraintsChangedListener |
stateGetConstraintID
Added in 2.2.1
public int stateGetConstraintID(int id, int width, int height)
Get the constraint id for a state
| Parameters | |
|---|---|
int id |
|
int width |
|
int height |
| Returns | |
|---|---|
int |
updateConstraints
Added in 2.2.1
public int updateConstraints(int currentId, int id, float width, float height)
Update the Constraints
| Parameters | |
|---|---|
int currentId |
|
int id |
|
float width |
|
float height |
| Returns | |
|---|---|
int |