ConstraintAttribute

public class ConstraintAttribute


Defines non standard Attributes

Summary

Public constructors

ConstraintAttribute(
    @NonNull String name,
    @NonNull ConstraintAttribute.AttributeType attributeType,
    @NonNull Object value,
    @NonNull boolean method
)

Public methods

@NonNull void
@NonNull boolean
diff(@NonNull ConstraintAttribute constraintAttribute)

test if the two attributes are different

static @NonNull HashMap<@NonNull String, @NonNull ConstraintAttribute>
@NonNull ConstraintAttribute.AttributeType
@NonNull float

Transforms value to a float for the purpose of interpolation

@NonNull void
@NonNull boolean

Continuous types are interpolated they are fired only at

@NonNull int

The number of interpolation values that need to be interpolated Typically 1 but 3 for colors.

static @NonNull void
parse(
    @NonNull Context context,
    @NonNull XmlPullParser parser,
    @NonNull HashMap<@NonNull String, @NonNull ConstraintAttribute> custom
)
static @NonNull void
@NonNull void
setColorValue(@NonNull int value)
@NonNull void
setFloatValue(@NonNull float value)
@NonNull void
setIntValue(@NonNull int value)
@NonNull void
setInterpolatedValue(
    @NonNull View view,
    @NonNull Array<@NonNull float> value
)
@NonNull void
@NonNull void
setValue(@NonNull Array<@NonNull float> value)
@NonNull void

Public constructors

ConstraintAttribute

public ConstraintAttribute(
    @NonNull String name,
    @NonNull ConstraintAttribute.AttributeType attributeType
)

ConstraintAttribute

public ConstraintAttribute(
    @NonNull ConstraintAttribute source,
    @NonNull Object value
)

ConstraintAttribute

public ConstraintAttribute(
    @NonNull String name,
    @NonNull ConstraintAttribute.AttributeType attributeType,
    @NonNull Object value,
    @NonNull boolean method
)

Public methods

applyCustom

@NonNull
public void applyCustom(@NonNull View view)

diff

@NonNull
public boolean diff(@NonNull ConstraintAttribute constraintAttribute)

test if the two attributes are different

Parameters
@NonNull ConstraintAttribute constraintAttribute
Returns
boolean

extractAttributes

@NonNull
public static HashMap<@NonNull String, @NonNull ConstraintAttributeextractAttributes(
    @NonNull HashMap<@NonNull String, @NonNull ConstraintAttribute> base,
    @NonNull View view
)

getValueToInterpolate

@NonNull
public float getValueToInterpolate()

Transforms value to a float for the purpose of interpolation

Returns
float

interpolation value

getValuesToInterpolate

@NonNull
public void getValuesToInterpolate(@NonNull Array<@NonNull float> ret)

isContinuous

@NonNull
public boolean isContinuous()

Continuous types are interpolated they are fired only at

Returns
boolean

numberOfInterpolatedValues

@NonNull
public int numberOfInterpolatedValues()

The number of interpolation values that need to be interpolated Typically 1 but 3 for colors.

Returns
int

Typically 1 but 3 for colors.

parse

@NonNull
public static void parse(
    @NonNull Context context,
    @NonNull XmlPullParser parser,
    @NonNull HashMap<@NonNull String, @NonNull ConstraintAttribute> custom
)

setAttributes

@NonNull
public static void setAttributes(
    @NonNull View view,
    @NonNull HashMap<@NonNull String, @NonNull ConstraintAttribute> map
)

setColorValue

@NonNull
public void setColorValue(@NonNull int value)

setFloatValue

@NonNull
public void setFloatValue(@NonNull float value)

setIntValue

@NonNull
public void setIntValue(@NonNull int value)

setInterpolatedValue

@NonNull
public void setInterpolatedValue(
    @NonNull View view,
    @NonNull Array<@NonNull float> value
)

setStringValue

@NonNull
public void setStringValue(@NonNull String value)

setValue

@NonNull
public void setValue(@NonNull Array<@NonNull float> value)

setValue

@NonNull
public void setValue(@NonNull Object value)