Stay organized with collections Save and categorize content based on your preferences.

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

Public methods

void
addCustomColor(String name, int color)
void
addCustomFloat(String name, float value)
float
float
boolean

Return whether this WidgetFrame contains a custom property of the given name.

CustomVariable

Get the custom attribute given Nam

Set<String>

Get the known custom Attributes names

int
float
String
TypedBundle

get the property bundle associated with MotionAttributes

int
static void
interpolate(
    int parentWidth,
    int parentHeight,
    WidgetFrame frame,
    WidgetFrame start,
    WidgetFrame end,
    Transition transition,
    float progress
)
boolean
StringBuilder
StringBuilder
serialize(StringBuilder ret, boolean sendPhoneOrientation)

If true also send the phone orientation

void
setCustomAttribute(String name, int type, String value)
void
setCustomAttribute(String name, int type, float value)
void
setCustomAttribute(String name, int type, int value)
void
setCustomAttribute(String name, int type, boolean value)
void
setCustomValue(CustomAttribute valueAt, float[] mTempValues)
boolean
setValue(String key, CLElement value)
WidgetFrame
WidgetFrame
void
int

Public fields

alpha

public float alpha

bottom

public int bottom

interpolatedPos

public float interpolatedPos

left

public int left

name

public String name

phone_orientation

public static float phone_orientation

pivotX

public float pivotX

pivotY

public float pivotY

right

public int right

rotationX

public float rotationX

rotationY

public float rotationY

rotationZ

public float rotationZ

scaleX

public float scaleX

scaleY

public float scaleY

top

public int top

translationX

public float translationX

translationY

public float translationY

translationZ

public float translationZ

visibility

public int visibility

widget

public ConstraintWidget widget

Public constructors

WidgetFrame

public WidgetFrame()

WidgetFrame

public WidgetFrame(WidgetFrame frame)

WidgetFrame

public WidgetFrame(ConstraintWidget widget)

Public methods

addCustomColor

public void addCustomColor(String name, int color)

addCustomFloat

public void addCustomFloat(String name, float value)

centerX

public float centerX()

centerY

public float centerY()

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<StringgetCustomAttributeNames()

Get the known custom Attributes names

Returns
Set<String>

set of custom attribute names

getCustomColor

public int getCustomColor(String name)

getCustomFloat

public float getCustomFloat(String name)

getId

public String getId()

getMotionProperties

public TypedBundle getMotionProperties()

get the property bundle associated with MotionAttributes

Returns
TypedBundle

the property bundle associated with MotionAttributes or null

height

public int height()

interpolate

public static void interpolate(
    int parentWidth,
    int parentHeight,
    WidgetFrame frame,
    WidgetFrame start,
    WidgetFrame end,
    Transition transition,
    float progress
)

isDefaultTransform

public boolean isDefaultTransform()

serialize

public StringBuilder serialize(StringBuilder ret)

serialize

public StringBuilder serialize(StringBuilder ret, boolean sendPhoneOrientation)

If true also send the phone orientation

setCustomAttribute

public void setCustomAttribute(String name, int type, String value)

setCustomAttribute

public void setCustomAttribute(String name, int type, float value)

setCustomAttribute

public void setCustomAttribute(String name, int type, int value)

setCustomAttribute

public void setCustomAttribute(String name, int type, boolean value)

setCustomValue

public void setCustomValue(CustomAttribute valueAt, float[] mTempValues)

setValue

public boolean setValue(String key, CLElement value)
Throws
androidx.constraintlayout.core.parser.CLParsingException androidx.constraintlayout.core.parser.CLParsingException

update

public WidgetFrame update()

update

public WidgetFrame update(ConstraintWidget widget)

updateAttributes

public void updateAttributes(WidgetFrame frame)

width

public int width()