ConstraintAttribute
class ConstraintAttribute
Defines non standard Attributes
Summary
Nested types |
|---|
Public constructors |
|---|
ConstraintAttribute( |
ConstraintAttribute(source: ConstraintAttribute!, value: Any!) |
ConstraintAttribute( |
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!>! |
extractAttributes(base: HashMap<String!, ConstraintAttribute!>!, view: View!)extract attributes from the view |
Int |
|
Float |
|
Int |
|
String! |
getName() |
String! |
|
ConstraintAttribute.AttributeType! |
getType() |
Float |
Transforms value to a float for the purpose of interpolation |
Unit |
getValuesToInterpolate(ret: FloatArray!)populate the float array with colors it will fill 4 values |
Boolean |
|
Boolean |
Continuous types are interpolated they are fired only at |
Boolean |
isMethod() |
Int |
The number of interpolation values that need to be interpolated Typically 1 but 3 for colors. |
java-static Unit |
parse(parse Custom attributes and fill Custom |
java-static Unit |
setAttributes(view: View!, map: HashMap<String!, ConstraintAttribute!>!)set attributes from map on to the view |
Unit |
setColorValue(value: Int) |
Unit |
setFloatValue(value: Float) |
Unit |
setIntValue(value: Int) |
Unit |
setStringValue(value: String!) |
Unit |
set the value based on casting the object |
Unit |
setValue(value: FloatArray!)setValue based on the values in the array |
Public constructors
ConstraintAttribute
ConstraintAttribute(
name: String!,
attributeType: ConstraintAttribute.AttributeType!
)
ConstraintAttribute
ConstraintAttribute(
name: String!,
attributeType: ConstraintAttribute.AttributeType!,
value: Any!,
method: Boolean
)
Public functions
applyCustom
fun applyCustom(view: View!): Unit
Apply custom attributes to the view
| Parameters | |
|---|---|
view: View! |
diff
fun diff(constraintAttribute: ConstraintAttribute!): Boolean
test if the two attributes are different
| Parameters | |
|---|---|
constraintAttribute: ConstraintAttribute! |
| Returns | |
|---|---|
Boolean |
extractAttributes
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! |
| Returns | |
|---|---|
HashMap<String!, ConstraintAttribute!>! |
getValueToInterpolate
fun getValueToInterpolate(): Float
Transforms value to a float for the purpose of interpolation
| Returns | |
|---|---|
Float |
interpolation value |
getValuesToInterpolate
fun getValuesToInterpolate(ret: FloatArray!): Unit
populate the float array with colors it will fill 4 values
| Parameters | |
|---|---|
ret: FloatArray! |
isContinuous
fun isContinuous(): Boolean
Continuous types are interpolated they are fired only at
| Returns | |
|---|---|
Boolean |
numberOfInterpolatedValues
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
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
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!>! |
setValue
fun setValue(value: Any!): Unit
set the value based on casting the object
| Parameters | |
|---|---|
value: Any! |
setValue
fun setValue(value: FloatArray!): Unit
setValue based on the values in the array
| Parameters | |
|---|---|
value: FloatArray! |