Android Guides | Samples

Android.Graphics.Drawables.TransitionDrawable Class

An extension of LayerDrawables that is intended to cross-fade between the first and second layer.

See Also: TransitionDrawable

Syntax

[Android.Runtime.Register("android/graphics/drawable/TransitionDrawable", DoNotGenerateAcw=true)]
public class TransitionDrawable : LayerDrawable, IDisposable

Remarks

An extension of LayerDrawables that is intended to cross-fade between the first and second layer. To start the transition, call TransitionDrawable.StartTransition(Int32). To display just the first layer, call TransitionDrawable.ResetTransition.

It can be defined in an XML file with the <transition> element. Each Drawable in the transition is defined in a nested <item>. For more information, see the guide to Drawable Resources.

[Android Documentation]

Requirements

Namespace: Android.Graphics.Drawables
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1

The members of Android.Graphics.Drawables.TransitionDrawable are listed below.

See Also: LayerDrawable

Public Constructors

Create a new transition drawable with the specified list of layers.

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.

Public Properties

CrossFadeEnabledBoolean. Indicates whether the cross fade is enabled for this transition.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

ResetTransition()
Show only the first layer.
ReverseTransition(Int32)
Reverses the transition, picking up where the transition currently is.
StartTransition(Int32)
Begin the second layer on top of the first layer.