• Home
  • Raw
  • Download

Lines Matching refs:transition

21 these animations as transition objects, which contain information about an animation. To
22 run an animation, you provide the transition to use and the ending scene to a transition
34 want to change between, you need to create a {@link android.transition.Transition} object
35 that defines an animation. The framework enables you to specify a built-in transition in a
36 resource file and inflate it in your code or to create an instance of a built-in transition
39 <!-- Built in transition table -->
40 <p class="table-caption" id="table1"><strong>Table 1.</strong> Built-in transition types.</p>
49 …<td><code><a href="/reference/android/transition/AutoTransition.html">AutoTransition</a></code></t…
52 <td>Default transition. Fade out, move and resize, and fade in views, in that order.</td>
55 <td><code><a href="/reference/android/transition/Fade.html">Fade</a></code></td>
65 <td><code><a href="/reference/android/transition/ChangeBounds.html">ChangeBounds</a></code></td>
73 <h3 id="FromFile">Create a transition instance from a resource file</h3>
75 <p>This technique enables you to modify your transition definition without having to change
76 the code of your activity. This technique is also useful to separate complex transition
80 <p>To specify a built-in transition in a resource file, follow these steps:</p>
83 <li>Add the <code>res/transition/</code> directory to your project.</li>
88 <p>For example, the following resource file specifies the {@link android.transition.Fade}
89 transition:</p>
91 <p class="code-caption">res/transition/fade_transition.xml</p>
97 <p>The following code snippet shows how to inflate a {@link android.transition.Transition}
103 inflateTransition(R.transition.fade_transition);
107 <h3 id="FromCode">Create a transition instance in your code</h3>
109 <p>This technique is useful for creating transition objects dynamically if you modify the user
110 interface in your code, and to create simple built-in transition instances with few or
113 <p>To create an instance of a built-in transition, invoke one of the public constructors in
114 the subclasses of the {@link android.transition.Transition} class. For example, the following
115 code snippet creates an instance of the {@link android.transition.Fade} transition:</p>
125 <p>You typically apply a transition to change between different view hierarchies in response
128 results layout while applying a transition that fades out the search button and fades in the
131 <p>To make a scene change while applying a transition in response to some event in your
132 activity, call the {@link android.transition.TransitionManager#go TransitionManager.go()}
133 static method with the ending scene and the transition instance to use for the animation,
141 from the ending scene while running the animation specified by the transition instance. The
142 starting scene is the ending scene from the last transition. If there was no previous
143 transition, the starting scene is determined automatically from the current state of the
146 <p>If you do not specify a transition instance, the transition manager can apply an automatic
147 transition that does something reasonable for most situations. For more information, see the
148 API reference for the {@link android.transition.TransitionManager} class.</p>
158 transition. The framework enables you to select specific views you want to animate.</p>
160 <p>Each view that the transition animates is called a <em>target</em>. You can only
164 android.transition.Transition#removeTarget removeTarget()} method before starting
165 the transition. To add only the views you specify to the list of targets, call the
166 {@link android.transition.Transition#addTarget addTarget()} method. For more
167 information, see the API reference for the {@link android.transition.Transition} class.</p>
180 to combine animation effects in a transition set that contains a group of individual built-in
183 <p>To define a transition set from a collection of transitions in XML, create a resource file
186 transition set that has the same behaviour as the {@link android.transition.AutoTransition}
198 <p>To inflate the transition set into a {@link android.transition.TransitionSet} object in
199 your code, call the {@link android.transition.TransitionInflater#from TransitionInflater.from()}
200 method in your activity. The {@link android.transition.TransitionSet} class extends from the
201 {@link android.transition.Transition} class, so you can use it with a transition manager just
202 like any other {@link android.transition.Transition} instance.</p>
222 create a scene. Instead, you can create and apply a transition between two states of a view
223 hierarchy using a <em>delayed transition</em>. This feature of the transitions framework
225 a transition that animates the changes when the system redraws the user interface.</p>
227 <p>To create a delayed transition within a single view hierarchy, follow these steps:</p>
230 <li>When the event that triggers the transition occurs, call the {@link
231 android.transition.TransitionManager#beginDelayedTransition
233 you want to change and the transition to use. The framework stores the current state of the
242 using a delayed transition. The first snippet shows the layout definition file:</p>
279 // Get the root view and create a transition
297 <p>The transition lifecycle is similar to the activity lifecycle. It represents the transition
299 android.transition.TransitionManager#go TransitionManager.go()} method and the completion of
301 the {@link android.transition.Transition.TransitionListener TransitionListener}
307 because the ending view hierarchy is not inflated until the transition is completed.
309 hierarchy when the framework has finished the transition. To get notified when the transition
311 android.transition.Transition.TransitionListener#onTransitionEnd
315 android.transition.Transition.TransitionListener TransitionListener} class.</p>