class KeyPosition : Key


Provide the passive data structure to get KeyPosition information form XML

Summary

Constants

const String!
DRAWPATH = "drawPath"
const String!
PERCENT_HEIGHT = "percentHeight"
const String!
PERCENT_WIDTH = "percentWidth"
const String!
PERCENT_X = "percentX"
const String!
PERCENT_Y = "percentY"
const Float
const String!
SIZE_PERCENT = "sizePercent"
const String!
TRANSITION_EASING = "transitionEasing"
const Int
const Int
const Int
const Int

Public constructors

Public functions

Unit

Defines method to add a a view to splines derived form this key frame.

Key!

Clone this KeyAttributes

Key!
copy(src: Key!)

Copy the key

Boolean
intersects(
    layoutWidth: Int,
    layoutHeight: Int,
    start: RectF!,
    end: RectF!,
    x: Float,
    y: Float
)
Unit
load(context: Context!, attrs: AttributeSet!)
Unit
positionAttributes(
    view: View!,
    start: RectF!,
    end: RectF!,
    x: Float,
    y: Float,
    attribute: Array<String!>!,
    value: FloatArray!
)
Unit
setType(type: Int)
Unit
setValue(tag: String!, value: Any!)

Set the value associated with this tag

Inherited Constants

From androidx.constraintlayout.motion.widget.Key
const String!
ALPHA = "alpha"
const String!
CURVEFIT = "curveFit"
const String!
CUSTOM = "CUSTOM"
const String!
ELEVATION = "elevation"
const String!
MOTIONPROGRESS = "motionProgress"
const String!
PIVOT_X = "transformPivotX"
const String!
PIVOT_Y = "transformPivotY"
const String!
PROGRESS = "progress"
const String!
ROTATION = "rotation"
const String!
ROTATION_X = "rotationX"
const String!
ROTATION_Y = "rotationY"
const String!
SCALE_X = "scaleX"
const String!
SCALE_Y = "scaleY"
const String!
TRANSITIONEASING = "transitionEasing"
const String!
TRANSITION_PATH_ROTATE = "transitionPathRotate"
const String!
TRANSLATION_X = "translationX"
const String!
TRANSLATION_Y = "translationY"
const String!
TRANSLATION_Z = "translationZ"
const String!
VISIBILITY = "visibility"
const String!
WAVE_OFFSET = "waveOffset"
const String!
WAVE_PERIOD = "wavePeriod"
const String!
WAVE_PHASE = "wavePhase"
const String!
WAVE_VARIES_BY = "waveVariesBy"

Inherited functions

From androidx.constraintlayout.motion.widget.Key
Int

Gets the current frame position

Unit

sets the frame position

Unit
setInterpolation(interpolation: HashMap<String!, Int!>!)

Key frame can specify the type of interpolation it wants on various attributes For each string it set it to -1, CurveFit.LINEAR or CurveFit.SPLINE

Key!

set the id of the view

Inherited properties

From androidx.constraintlayout.motion.widget.Key
java-static Int
Int

Constants

DRAWPATH

Added in 2.2.0
const val DRAWPATH = "drawPath": String!

PERCENT_HEIGHT

Added in 2.2.0
const val PERCENT_HEIGHT = "percentHeight": String!

PERCENT_WIDTH

Added in 2.2.0
const val PERCENT_WIDTH = "percentWidth": String!

PERCENT_X

Added in 2.2.0
const val PERCENT_X = "percentX": String!

PERCENT_Y

Added in 2.2.0
const val PERCENT_Y = "percentY": String!

SELECTION_SLOPE

protected const val SELECTION_SLOPE = 20.0f: Float

SIZE_PERCENT

Added in 2.2.0
const val SIZE_PERCENT = "sizePercent": String!

TRANSITION_EASING

Added in 2.2.0
const val TRANSITION_EASING = "transitionEasing": String!

TYPE_AXIS

Added in 2.2.0
const val TYPE_AXIS = 3: Int

TYPE_CARTESIAN

Added in 2.2.0
const val TYPE_CARTESIAN = 0: Int

TYPE_PATH

Added in 2.2.0
const val TYPE_PATH = 1: Int

TYPE_SCREEN

Added in 2.2.0
const val TYPE_SCREEN = 2: Int

Public constructors

KeyPosition

Added in 2.2.0
KeyPosition()

Public functions

addValues

Added in 2.2.0
fun addValues(splines: HashMap<String!, ViewSpline!>!): Unit

Defines method to add a a view to splines derived form this key frame. The values are written to the spline

Parameters
splines: HashMap<String!, ViewSpline!>!

splines to write values to

clone

Added in 2.2.0
fun clone(): Key!

Clone this KeyAttributes

Returns
Key!

copy

fun copy(src: Key!): Key!

Copy the key

Parameters
src: Key!

to be copied

Returns
Key!

self

intersects

Added in 2.2.0
fun intersects(
    layoutWidth: Int,
    layoutHeight: Int,
    start: RectF!,
    end: RectF!,
    x: Float,
    y: Float
): Boolean
Parameters
layoutWidth: Int
layoutHeight: Int
start: RectF!
end: RectF!
x: Float
y: Float
Returns
Boolean

load

Added in 2.2.0
fun load(context: Context!, attrs: AttributeSet!): Unit

positionAttributes

Added in 2.2.0
fun positionAttributes(
    view: View!,
    start: RectF!,
    end: RectF!,
    x: Float,
    y: Float,
    attribute: Array<String!>!,
    value: FloatArray!
): Unit
Parameters
view: View!
start: RectF!
end: RectF!
x: Float
y: Float
attribute: Array<String!>!
value: FloatArray!

setType

Added in 2.2.0
fun setType(type: Int): Unit

setValue

Added in 2.2.0
fun setValue(tag: String!, value: Any!): Unit

Set the value associated with this tag

Parameters
tag: String!
value: Any!