Added in API level 1

AlphaAnimation

open class AlphaAnimation : Animation
kotlin.Any
   ↳ android.view.animation.Animation
   ↳ android.view.animation.AlphaAnimation

An animation that controls the alpha level of an object. Useful for fading things in and out. This animation ends up changing the alpha property of a Transformation

Summary

Inherited constants
Public constructors
AlphaAnimation(context: Context!, attrs: AttributeSet!)

Constructor used when an AlphaAnimation is loaded from a resource.

AlphaAnimation(fromAlpha: Float, toAlpha: Float)

Constructor to use when building an AlphaAnimation from code

Public methods
open Boolean

open Boolean

Protected methods
open Unit
applyTransformation(interpolatedTime: Float, t: Transformation!)

Changes the alpha property of the supplied Transformation

Inherited functions

Public constructors

AlphaAnimation

Added in API level 1
AlphaAnimation(
    context: Context!,
    attrs: AttributeSet!)

Constructor used when an AlphaAnimation is loaded from a resource.

Parameters
context Context!: Application context to use
attrs AttributeSet!: Attribute set from which to read values

AlphaAnimation

Added in API level 1
AlphaAnimation(
    fromAlpha: Float,
    toAlpha: Float)

Constructor to use when building an AlphaAnimation from code

Parameters
fromAlpha Float: Starting alpha value for the animation, where 1.0 means fully opaque and 0.0 means fully transparent.
toAlpha Float: Ending alpha value for the animation.

Public methods

willChangeBounds

Added in API level 1
open fun willChangeBounds(): Boolean
Return
Boolean true if this animation will change the view's bounds

willChangeTransformationMatrix

Added in API level 1
open fun willChangeTransformationMatrix(): Boolean
Return
Boolean true if this animation will change the transformation matrix

Protected methods

applyTransformation

Added in API level 1
protected open fun applyTransformation(
    interpolatedTime: Float,
    t: Transformation!
): Unit

Changes the alpha property of the supplied Transformation

Parameters
interpolatedTime Float: The value of the normalized time (0.0 to 1.0) after it has been run through the interpolation function.
t Transformation!: The Transformation object to fill in with the current transforms.