WidgetFrame
public class WidgetFrame
Utility class to encapsulate layout of a widget
Summary
Public fields |
|
|---|---|
float |
|
int |
|
float |
|
int |
|
String |
|
static float |
|
float |
|
float |
|
int |
|
float |
|
float |
|
float |
|
float |
|
float |
|
int |
|
float |
|
float |
|
float |
|
int |
|
ConstraintWidget |
Public constructors |
|---|
WidgetFrame(WidgetFrame frame) |
WidgetFrame(ConstraintWidget widget) |
Public methods |
|
|---|---|
void |
addCustomColor(String name, int color) |
void |
addCustomFloat(String name, float value) |
float |
centerX() |
float |
centerY() |
boolean |
containsCustom(@NonNull String name)Return whether this WidgetFrame contains a custom property of the given name. |
CustomVariable |
getCustomAttribute(String name)Get the custom attribute given Nam |
Set<String> |
Get the known custom Attributes names |
int |
getCustomColor(String name) |
float |
getCustomFloat(String name) |
String |
getId() |
TypedBundle |
get the property bundle associated with MotionAttributes |
int |
height() |
static void |
interpolate( |
boolean |
|
StringBuilder |
serialize(StringBuilder ret) |
StringBuilder |
serialize(StringBuilder ret, boolean sendPhoneOrientation)If true also send the phone orientation |
void |
setCustomAttribute(String name, int type, boolean value) |
void |
setCustomAttribute(String name, int type, float value) |
void |
setCustomAttribute(String name, int type, int value) |
void |
setCustomAttribute(String name, int type, String value) |
void |
setCustomValue(CustomAttribute valueAt, float[] mTempValues) |
boolean |
|
WidgetFrame |
update() |
WidgetFrame |
update(ConstraintWidget widget) |
void |
updateAttributes(WidgetFrame frame) |
int |
width() |
Public fields
Public constructors
Public methods
containsCustom
public boolean containsCustom(@NonNull String name)
Return whether this WidgetFrame contains a custom property of the given name.
getCustomAttribute
public CustomVariable getCustomAttribute(String name)
Get the custom attribute given Nam
| Parameters | |
|---|---|
String name |
Name of the custom attribut |
| Returns | |
|---|---|
CustomVariable |
The customAttribute |
getCustomAttributeNames
public Set<String> getCustomAttributeNames()
Get the known custom Attributes names
getMotionProperties
public TypedBundle getMotionProperties()
get the property bundle associated with MotionAttributes
| Returns | |
|---|---|
TypedBundle |
the property bundle associated with MotionAttributes or null |
interpolate
public static void interpolate(
int parentWidth,
int parentHeight,
WidgetFrame frame,
WidgetFrame start,
WidgetFrame end,
Transition transition,
float progress
)
serialize
public StringBuilder serialize(StringBuilder ret, boolean sendPhoneOrientation)
If true also send the phone orientation
setCustomAttribute
public void setCustomAttribute(String name, int type, boolean value)
setCustomAttribute
public void setCustomAttribute(String name, int type, float value)
setCustomAttribute
public void setCustomAttribute(String name, int type, String value)
setCustomValue
public void setCustomValue(CustomAttribute valueAt, float[] mTempValues)