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

MotionWidget

public class MotionWidget implements TypedValues


Summary

Nested types

public class MotionWidget.Motion

Constants

static final int
static final int
GONE_UNSET = -2147483648
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
UNSET = -1
static final int
static final int
static final int
static final int

Public constructors

Public methods

MotionWidget
findViewById(int mTransformPivotTarget)
float
int
CustomVariable
Set<String>
int
int
getId(String name)
int
String
MotionWidget
float
float
int
float
float
float
float
float
int
float
float
float
float

Sets the attributes

int
WidgetFrame
int
int
int
void
layout(int l, int t, int r, int b)
void
setBounds(int left, int top, int right, int bottom)
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
setInterpolatedValue(CustomAttribute attribute, float[] mCache)
void
setPivotX(float px)
void
setPivotY(float py)
void
setRotationX(float rotationX)
void
setRotationY(float rotationY)
void
setRotationZ(float rotationZ)
void
setScaleX(float scaleX)
void
setScaleY(float scaleY)
void
setTranslationX(float translationX)
void
setTranslationY(float translationY)
void
setTranslationZ(float tz)
boolean
setValue(int id, String value)

Used to set String values

boolean
setValue(int id, int value)

Used to set integer values

boolean
setValue(int id, float value)

Used to set float values

boolean
setValue(int id, boolean value)

Used to set boolean values

boolean
setValueAttributes(int id, float value)

Sets the attributes

boolean
setValueMotion(int id, String value)
boolean
setValueMotion(int id, int value)
boolean
setValueMotion(int id, float value)
void
setVisibility(int visibility)
String
void

This populates the motion attributes from widgetFrame to the MotionWidget

Inherited Constants

From androidx.constraintlayout.core.motion.utils.TypedValues
static final int
static final int
static final int
static final int
static final String
S_CUSTOM = "CUSTOM"
static final int
static final int

Constants

FILL_PARENT

public static final int FILL_PARENT = -1

GONE_UNSET

public static final int GONE_UNSET = -2147483648

INVISIBLE

public static final int INVISIBLE = 0

MATCH_CONSTRAINT

public static final int MATCH_CONSTRAINT = 0

MATCH_CONSTRAINT_WRAP

public static final int MATCH_CONSTRAINT_WRAP = 1

MATCH_PARENT

public static final int MATCH_PARENT = -1

PARENT_ID

public static final int PARENT_ID = 0

ROTATE_LEFT_OF_PORTRATE

public static final int ROTATE_LEFT_OF_PORTRATE = 4

ROTATE_NONE

public static final int ROTATE_NONE = 0

ROTATE_PORTRATE_OF_LEFT

public static final int ROTATE_PORTRATE_OF_LEFT = 2

ROTATE_PORTRATE_OF_RIGHT

public static final int ROTATE_PORTRATE_OF_RIGHT = 1

ROTATE_RIGHT_OF_PORTRATE

public static final int ROTATE_RIGHT_OF_PORTRATE = 3

UNSET

public static final int UNSET = -1

VISIBILITY_MODE_IGNORE

public static final int VISIBILITY_MODE_IGNORE = 1

VISIBILITY_MODE_NORMAL

public static final int VISIBILITY_MODE_NORMAL = 0

VISIBLE

public static final int VISIBLE = 4

WRAP_CONTENT

public static final int WRAP_CONTENT = -2

Public constructors

MotionWidget

public MotionWidget()

MotionWidget

public MotionWidget(WidgetFrame f)

Public methods

findViewById

public MotionWidget findViewById(int mTransformPivotTarget)

getAlpha

public float getAlpha()

getBottom

public int getBottom()

getCustomAttribute

public CustomVariable getCustomAttribute(String name)

getCustomAttributeNames

public Set<StringgetCustomAttributeNames()

getHeight

public int getHeight()

getId

public int getId(String name)

getLeft

public int getLeft()

getName

public String getName()

getParent

public MotionWidget getParent()

getPivotX

public float getPivotX()

getPivotY

public float getPivotY()

getRight

public int getRight()

getRotationX

public float getRotationX()

getRotationY

public float getRotationY()

getRotationZ

public float getRotationZ()

getScaleX

public float getScaleX()

getScaleY

public float getScaleY()

getTop

public int getTop()

getTranslationX

public float getTranslationX()

getTranslationY

public float getTranslationY()

getTranslationZ

public float getTranslationZ()

getValueAttributes

public float getValueAttributes(int id)

Sets the attributes

getVisibility

public int getVisibility()

getWidgetFrame

public WidgetFrame getWidgetFrame()

getWidth

public int getWidth()

getX

public int getX()

getY

public int getY()

layout

public void layout(int l, int t, int r, int b)

setBounds

public void setBounds(int left, int top, int right, int bottom)

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)

setInterpolatedValue

public void setInterpolatedValue(CustomAttribute attribute, float[] mCache)

setPivotX

public void setPivotX(float px)

setPivotY

public void setPivotY(float py)

setRotationX

public void setRotationX(float rotationX)

setRotationY

public void setRotationY(float rotationY)

setRotationZ

public void setRotationZ(float rotationZ)

setScaleX

public void setScaleX(float scaleX)

setScaleY

public void setScaleY(float scaleY)

setTranslationX

public void setTranslationX(float translationX)

setTranslationY

public void setTranslationY(float translationY)

setTranslationZ

public void setTranslationZ(float tz)

setValue

public boolean setValue(int id, String value)

Used to set String values

Returns
boolean

true if it accepted the value

setValue

public boolean setValue(int id, int value)

Used to set integer values

Returns
boolean

true if it accepted the value

setValue

public boolean setValue(int id, float value)

Used to set float values

Returns
boolean

true if it accepted the value

setValue

public boolean setValue(int id, boolean value)

Used to set boolean values

Returns
boolean

true if it accepted the value

setValueAttributes

public boolean setValueAttributes(int id, float value)

Sets the attributes

setValueMotion

public boolean setValueMotion(int id, String value)

setValueMotion

public boolean setValueMotion(int id, int value)

setValueMotion

public boolean setValueMotion(int id, float value)

setVisibility

public void setVisibility(int visibility)

toString

public String toString()

updateMotion

public void updateMotion(TypedValues toUpdate)

This populates the motion attributes from widgetFrame to the MotionWidget