Lines Matching refs:transition

17 package android.support.transition;
35 * transition objects with calls to {@link #setTransition(Scene, Transition)}
40 * only necessary if the application wants different transition behavior
44 * <code>res/transition</code> directory. TransitionManager resources consist of
46 * <code>transition</code> tags, each of which describe the relationship of
47 * that transition to the from/to scene information in that tag.
53 * &lt;transition android:fromScene="@layout/transition_scene1"
55 * android:transition="@transition/changebounds"/&gt;
56 * &lt;transition android:fromScene="@layout/transition_scene2"
58 * android:transition="@transition/changebounds"/&gt;
59 * &lt;transition android:toScene="@layout/transition_scene3"
60 * android:transition="@transition/changebounds_fadein_together"/&gt;
61 * &lt;transition android:fromScene="@layout/transition_scene3"
63 * android:transition="@transition/changebounds_fadeout_sequential"/&gt;
64 * &lt;transition android:fromScene="@layout/transition_scene3"
66 * android:transition="@transition/changebounds_fadeout_sequential"/&gt;
74 * <code>transition</code> attribute, there is a reference to a resource
75 * file in the <code>res/transition</code> directory which describes that
76 * transition.</p>
91 * Sets a specific transition to occur when the given scene is entered.
94 * transition to run.
95 * @param transition The transition that will play when the given scene is
97 * using the default transition instead.
99 public void setTransition(@NonNull Scene scene, @Nullable Transition transition) {
100 mSceneTransitions.put(scene, transition);
104 * Sets a specific transition to occur when the given pair of scenes is
107 * @param fromScene The scene being exited when the given transition will
109 * @param toScene The scene being entered when the given transition will
111 * @param transition The transition that will play when the given scene is
113 * using the default transition instead.
116 @Nullable Transition transition) {
122 sceneTransitionMap.put(fromScene, transition);
132 * Transition was specified for this scene change, the default transition
136 Transition transition;
145 transition = sceneTransitionMap.get(currScene);
146 if (transition != null) {
147 return transition;
152 transition = mSceneTransitions.get(scene);
153 return (transition != null) ? transition : sDefaultTransition;
157 * This is where all of the work of a transition/scene-change is
159 * transition, exits the current Scene, enters the new scene, captures
160 * the end values for the transition, and finally plays the
161 * resulting values-populated transition.
164 * @param transition The transition to play for this scene change
166 private static void changeScene(Scene scene, Transition transition) {
170 if (transition == null) {
175 Transition transitionClone = transition.clone();
204 final Transition transition) {
205 if (transition != null && sceneRoot != null) {
206 MultiListener listener = new MultiListener(transition, sceneRoot);
215 * about since that's what triggers the transition to take place.
227 MultiListener(Transition transition, ViewGroup sceneRoot) {
228 mTransition = transition;
259 // Don't start the transition if it's no longer pending.
278 public void onTransitionEnd(@NonNull Transition transition) {
280 currentTransitions.remove(transition);
295 private static void sceneChangeSetup(ViewGroup sceneRoot, Transition transition) {
305 if (transition != null) {
306 transition.captureValues(sceneRoot, true);
318 * appropriate transition for this particular scene change
320 * if no such transition exists).
325 // Auto transition if there is no transition declared for the Scene, but there is
332 * the default transition for TransitionManager.
342 * the given transition.
344 * <p>Passing in <code>null</code> for the transition parameter will
345 * result in the scene changing without any transition running, and is
351 * @param transition The transition to use for this scene change. A
352 * value of null causes the scene change to happen with no transition.
354 public static void go(@NonNull Scene scene, @Nullable Transition transition) {
355 changeScene(scene, transition);
359 * Convenience method to animate, using the default transition,
363 * with a value of <code>null</code> for the <code>transition</code> parameter.
365 * @param sceneRoot The root of the View hierarchy to run the transition on.
375 * scene root and then post a request to run a transition on the next frame.
379 * the transition begins.
382 * unrelated code also wants to make dynamic changes and run a transition on
387 * <p>Passing in <code>null</code> for the transition parameter will
388 * cause the TransitionManager to use its default transition.</p>
390 * @param sceneRoot The root of the View hierarchy to run the transition on.
391 * @param transition The transition to use for this change. A
392 * value of null causes the TransitionManager to use the default transition.
395 @Nullable Transition transition) {
398 Log.d(LOG_TAG, "beginDelayedTransition: root, transition = "
399 + sceneRoot + ", " + transition);
402 if (transition == null) {
403 transition = sDefaultTransition;
405 final Transition transitionClone = transition.clone();
424 final Transition transition = copy.get(i);
425 transition.forceToEnd(sceneRoot);