class ConstraintAttribute


Defines non standard Attributes

Summary

Public constructors

ConstraintAttribute(
    name: String!,
    attributeType: ConstraintAttribute.AttributeType!
)
ConstraintAttribute(
    name: String!,
    attributeType: ConstraintAttribute.AttributeType!,
    value: Any!,
    method: Boolean
)

Public functions

Unit
applyCustom(view: View!)

Apply custom attributes to the view

Boolean
diff(constraintAttribute: ConstraintAttribute!)

test if the two attributes are different

java-static HashMap<String!, ConstraintAttribute!>!

extract attributes from the view

Int
Float
Int
String!
String!
ConstraintAttribute.AttributeType!
Float

Transforms value to a float for the purpose of interpolation

Unit

populate the float array with colors it will fill 4 values

Boolean
Boolean

Continuous types are interpolated they are fired only at

Boolean
Int

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

java-static Unit
parse(
    context: Context!,
    parser: XmlPullParser!,
    custom: HashMap<String!, ConstraintAttribute!>!
)

parse Custom attributes and fill Custom

java-static Unit

set attributes from map on to the view

Unit
Unit
Unit
setIntValue(value: Int)
Unit
Unit
setValue(value: Any!)

set the value based on casting the object

Unit

setValue based on the values in the array

Public constructors

ConstraintAttribute

Added in 2.2.0-alpha13
ConstraintAttribute(
    name: String!,
    attributeType: ConstraintAttribute.AttributeType!
)

ConstraintAttribute

Added in 2.2.0-alpha13
ConstraintAttribute(source: ConstraintAttribute!, value: Any!)

ConstraintAttribute

Added in 2.2.0-alpha13
ConstraintAttribute(
    name: String!,
    attributeType: ConstraintAttribute.AttributeType!,
    value: Any!,
    method: Boolean
)

Public functions

applyCustom

Added in 2.2.0-alpha13
fun applyCustom(view: View!): Unit

Apply custom attributes to the view

Parameters
view: View!

diff

Added in 2.2.0-alpha13
fun diff(constraintAttribute: ConstraintAttribute!): Boolean

test if the two attributes are different

Parameters
constraintAttribute: ConstraintAttribute!
Returns
Boolean

extractAttributes

Added in 2.2.0-alpha13
java-static fun extractAttributes(base: HashMap<String!, ConstraintAttribute!>!, view: View!): HashMap<String!, ConstraintAttribute!>!

extract attributes from the view

Parameters
base: HashMap<String!, ConstraintAttribute!>!
view: View!

getColorValue

Added in 2.2.0-alpha13
fun getColorValue(): Int

getFloatValue

Added in 2.2.0-alpha13
fun getFloatValue(): Float

getIntegerValue

Added in 2.2.0-alpha13
fun getIntegerValue(): Int

getName

Added in 2.2.0-alpha13
fun getName(): String!

getStringValue

Added in 2.2.0-alpha13
fun getStringValue(): String!

getValueToInterpolate

Added in 2.2.0-alpha13
fun getValueToInterpolate(): Float

Transforms value to a float for the purpose of interpolation

Returns
Float

interpolation value

getValuesToInterpolate

Added in 2.2.0-alpha13
fun getValuesToInterpolate(ret: FloatArray!): Unit

populate the float array with colors it will fill 4 values

Parameters
ret: FloatArray!

isBooleanValue

Added in 2.2.0-alpha13
fun isBooleanValue(): Boolean

isContinuous

Added in 2.2.0-alpha13
fun isContinuous(): Boolean

Continuous types are interpolated they are fired only at

Returns
Boolean

isMethod

Added in 2.2.0-alpha13
fun isMethod(): Boolean

numberOfInterpolatedValues

Added in 2.2.0-alpha13
fun numberOfInterpolatedValues(): Int

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

Added in 2.2.0-alpha13
java-static fun parse(
    context: Context!,
    parser: XmlPullParser!,
    custom: HashMap<String!, ConstraintAttribute!>!
): Unit

parse Custom attributes and fill Custom

Parameters
context: Context!
parser: XmlPullParser!
custom: HashMap<String!, ConstraintAttribute!>!

setAttributes

Added in 2.2.0-alpha13
java-static fun setAttributes(view: View!, map: HashMap<String!, ConstraintAttribute!>!): Unit

set attributes from map on to the view

Parameters
view: View!
map: HashMap<String!, ConstraintAttribute!>!

setColorValue

Added in 2.2.0-alpha13
fun setColorValue(value: Int): Unit

setFloatValue

Added in 2.2.0-alpha13
fun setFloatValue(value: Float): Unit

setIntValue

Added in 2.2.0-alpha13
fun setIntValue(value: Int): Unit

setStringValue

Added in 2.2.0-alpha13
fun setStringValue(value: String!): Unit

setValue

Added in 2.2.0-alpha13
fun setValue(value: Any!): Unit

set the value based on casting the object

Parameters
value: Any!

setValue

Added in 2.2.0-alpha13
fun setValue(value: FloatArray!): Unit

setValue based on the values in the array

Parameters
value: FloatArray!