Android Guides | Samples

Android.Transitions.TransitionManager Class

This class manages the set of transitions that fire when there is a change of Scene.

See Also: TransitionManager

Syntax

[Android.Runtime.Register("android/transition/TransitionManager", DoNotGenerateAcw=true)]
public class TransitionManager : Object

Remarks

This class manages the set of transitions that fire when there is a change of Scene. To use the manager, add scenes along with transition objects with calls to TransitionManager.SetTransition(Scene,Transition) or TransitionManager.SetTransition(Scene,Scene,Scene). Setting specific transitions for scene changes is not required; by default, a Scene change will use AutoTransition to do something reasonable for most situations. Specifying other transitions for particular scene changes is only necessary if the application wants different transition behavior in these situations.

xml Example

<transitionManager xmlns:android="http://schemas.android.com/apk/res/android">
    <transition android:fromScene="@layout/transition_scene1"
                android:toScene="@layout/transition_scene2"
                android:transition="@transition/changebounds"/>
    <transition android:fromScene="@layout/transition_scene2"
                android:toScene="@layout/transition_scene1"
                android:transition="@transition/changebounds"/>
    <transition android:toScene="@layout/transition_scene3"
                android:transition="@transition/changebounds_fadein_together"/>
    <transition android:fromScene="@layout/transition_scene3"
                android:toScene="@layout/transition_scene1"
                android:transition="@transition/changebounds_fadeout_sequential"/>
    <transition android:fromScene="@layout/transition_scene3"
                android:toScene="@layout/transition_scene2"
                android:transition="@transition/changebounds_fadeout_sequential"/>
</transitionManager>
Information on XML resource descriptions for transitions can be found for NoType:android/R$styleable;Href=../../../reference/android/R.styleable.html#Transition, NoType:android/R$styleable;Href=../../../reference/android/R.styleable.html#TransitionSet, NoType:android/R$styleable;Href=../../../reference/android/R.styleable.html#TransitionTarget, NoType:android/R$styleable;Href=../../../reference/android/R.styleable.html#Fade, and NoType:android/R$styleable;Href=../../../reference/android/R.styleable.html#TransitionManager.

TransitionManagers can be declared in XML resource files inside the res/transition directory. TransitionManager resources consist of the transitionManagertag name, containing one or more transition tags, each of which describe the relationship of that transition to the from/to scene information in that tag. For example, here is a resource file that declares several scene transitions:

For each of the fromScene and toScene attributes, there is a reference to a standard XML layout file. This is equivalent to creating a scene from a layout in code by calling Scene.GetSceneForLayout(ViewGroup,Int32,Int32). For the transition attribute, there is a reference to a resource file in the res/transition directory which describes that transition.

[Android Documentation]

Requirements

Namespace: Android.Transitions
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0

The members of Android.Transitions.TransitionManager are listed below.

See Also: Object

Public Constructors

Protected Constructors

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

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

static
BeginDelayedTransition(ViewGroup)
Convenience method to animate, using the default transition, to a new scene defined by all changes within the given scene root between calling this method and the next rendering frame.
static
BeginDelayedTransition(ViewGroup, Transition)
Convenience method to animate to a new scene defined by all changes within the given scene root between calling this method and the next rendering frame.
static
Go(Scene)
Convenience method to simply change to the given scene using the default transition for TransitionManager.
static
Go(Scene, Transition)
Convenience method to simply change to the given scene using the given transition.
SetTransition(Scene, Transition)
Sets a specific transition to occur when the given scene is entered.
SetTransition(Scene, Scene, Transition)
Sets a specific transition to occur when the given pair of scenes is exited/entered.
TransitionTo(Scene)
Change to the given scene, using the appropriate transition for this particular scene change (as specified to the TransitionManager, or the default if no such transition exists).