Added in API level 1

Transformation

open class Transformation
kotlin.Any
   ↳ android.view.animation.Transformation

Defines the transformation to be applied at one point in time of an Animation.

Summary

Constants
static Int

Indicates a transformation that applies an alpha only (uses an identity matrix.)

static Int

Indicates a transformation that applies an alpha and a matrix.

static Int

Indicates a transformation that has no effect (alpha = 1 and identity matrix.)

static Int

Indicates a transformation that applies a matrix only (alpha = 1.)

Public constructors

Creates a new transformation with alpha = 1 and the identity matrix.

Public methods
open Unit

Reset the transformation to a state that leaves the object being animated in an unmodified state.

open Unit

Apply this Transformation to an existing Transformation, e.

open Float

open Matrix!

open Int

Indicates the nature of this transformation.

open Unit

Clones the specified transformation.

open Unit
setAlpha(alpha: Float)

Sets the degree of transparency

open Unit
setTransformationType(transformationType: Int)

Sets the transformation type.

open String!

Return a string representation of the transformation in a compact form.

open String

Properties
Float

Matrix!

Int

Constants

TYPE_ALPHA

Added in API level 1
static val TYPE_ALPHA: Int

Indicates a transformation that applies an alpha only (uses an identity matrix.)

Value: 1

TYPE_BOTH

Added in API level 1
static val TYPE_BOTH: Int

Indicates a transformation that applies an alpha and a matrix.

Value: 3

TYPE_IDENTITY

Added in API level 1
static val TYPE_IDENTITY: Int

Indicates a transformation that has no effect (alpha = 1 and identity matrix.)

Value: 0

TYPE_MATRIX

Added in API level 1
static val TYPE_MATRIX: Int

Indicates a transformation that applies a matrix only (alpha = 1.)

Value: 2

Public constructors

Transformation

Added in API level 1
Transformation()

Creates a new transformation with alpha = 1 and the identity matrix.

Public methods

clear

Added in API level 1
open fun clear(): Unit

Reset the transformation to a state that leaves the object being animated in an unmodified state. The transformation type is TYPE_BOTH by default.

compose

Added in API level 1
open fun compose(t: Transformation!): Unit

Apply this Transformation to an existing Transformation, e.g. apply a scale effect to something that has already been rotated.

Parameters
t Transformation!:

getAlpha

Added in API level 1
open fun getAlpha(): Float
Return
Float The degree of transparency

getMatrix

Added in API level 1
open fun getMatrix(): Matrix!
Return
Matrix! The 3x3 Matrix representing the transformation to apply to the coordinates of the object being animated

getTransformationType

Added in API level 1
open fun getTransformationType(): Int

Indicates the nature of this transformation.

Return
Int TYPE_ALPHA, TYPE_MATRIX, TYPE_BOTH or TYPE_IDENTITY.

set

Added in API level 1
open fun set(t: Transformation!): Unit

Clones the specified transformation.

Parameters
t Transformation!: The transformation to clone.

setAlpha

Added in API level 1
open fun setAlpha(alpha: Float): Unit

Sets the degree of transparency

Parameters
alpha Float: 1.0 means fully opaque and 0.0 means fully transparent Value is between 0.0 and 1.0 inclusive

setTransformationType

Added in API level 1
open fun setTransformationType(transformationType: Int): Unit

Sets the transformation type.

Parameters
transformationType Int: One of TYPE_ALPHA, TYPE_MATRIX, TYPE_BOTH or TYPE_IDENTITY.

toShortString

Added in API level 3
open fun toShortString(): String!

Return a string representation of the transformation in a compact form.

toString

Added in API level 1
open fun toString(): String
Return
String a string representation of the object.

Properties

mAlpha

Added in API level 1
protected var mAlpha: Float

mMatrix

Added in API level 1
protected var mMatrix: Matrix!

mTransformationType

Added in API level 1
protected var mTransformationType: Int