Lines Matching refs:transition

17 package android.transition;
33 * transition objects with calls to {@link #setTransition(Scene, Transition)}
38 * only necessary if the application wants different transition behavior
42 * <code>res/transition</code> directory. TransitionManager resources consist of
44 * <code>transition</code> tags, each of which describe the relationship of
45 * that transition to the from/to scene information in that tag.
49 * {@sample development/samples/ApiDemos/res/transition/transitions_mgr.xml TransitionManager}
55 * <code>transition</code> attribute, there is a reference to a resource
56 * file in the <code>res/transition</code> directory which describes that
57 * transition.</p>
83 * Sets the transition to be used for any scene change for which no
84 * other transition is explicitly set. The initial value is
87 * @param transition The default transition to be used for scene changes.
91 public void setDefaultTransition(Transition transition) {
92 sDefaultTransition = transition;
96 * Gets the current default transition. The initial value is an {@link
99 * @return The current default transition.
109 * Sets a specific transition to occur when the given scene is entered.
112 * transition to run.
113 * @param transition The transition that will play when the given scene is
115 * using the default transition instead.
117 public void setTransition(Scene scene, Transition transition) {
118 mSceneTransitions.put(scene, transition);
122 * Sets a specific transition to occur when the given pair of scenes is
125 * @param fromScene The scene being exited when the given transition will
127 * @param toScene The scene being entered when the given transition will
129 * @param transition The transition that will play when the given scene is
131 * using the default transition instead.
133 public void setTransition(Scene fromScene, Scene toScene, Transition transition) {
139 sceneTransitionMap.put(fromScene, transition);
149 * Transition was specified for this scene change, the default transition
155 Transition transition = null;
163 transition = sceneTransitionMap.get(currScene);
164 if (transition != null) {
165 return transition;
170 transition = mSceneTransitions.get(scene);
171 return (transition != null) ? transition : sDefaultTransition;
175 * This is where all of the work of a transition/scene-change is
177 * transition, exits the current Scene, enters the new scene, captures
178 * the end values for the transition, and finally plays the
179 * resulting values-populated transition.
182 * @param transition The transition to play for this scene change
184 private static void changeScene(Scene scene, Transition transition) {
188 if (transition == null) {
193 Transition transitionClone = transition.clone();
224 final Transition transition) {
225 if (transition != null && sceneRoot != null) {
226 MultiListener listener = new MultiListener(transition, sceneRoot);
235 * about since that's what triggers the transition to take place.
247 MultiListener(Transition transition, ViewGroup sceneRoot) {
248 mTransition = transition;
284 // Don't start the transition if it's no longer pending.
303 public void onTransitionEnd(Transition transition) {
306 currentTransitions.remove(transition);
321 private static void sceneChangeSetup(ViewGroup sceneRoot, Transition transition) {
332 if (transition != null) {
333 transition.captureValues(sceneRoot, true);
345 * appropriate transition for this particular scene change
347 * if no such transition exists).
352 // Auto transition if there is no transition declared for the Scene, but there is
359 * the default transition for TransitionManager.
369 * the given transition.
371 * <p>Passing in <code>null</code> for the transition parameter will
372 * result in the scene changing without any transition running, and is
378 * @param transition The transition to use for this scene change. A
379 * value of null causes the scene change to happen with no transition.
381 public static void go(Scene scene, Transition transition) {
382 changeScene(scene, transition);
386 * Convenience method to animate, using the default transition,
390 * with a value of <code>null</code> for the <code>transition</code> parameter.
392 * @param sceneRoot The root of the View hierarchy to run the transition on.
402 * scene root and then post a request to run a transition on the next frame.
406 * the transition begins.
409 * unrelated code also wants to make dynamic changes and run a transition on
414 * <p>Passing in <code>null</code> for the transition parameter will
415 * cause the TransitionManager to use its default transition.</p>
417 * @param sceneRoot The root of the View hierarchy to run the transition on.
418 * @param transition The transition to use for this change. A
419 * value of null causes the TransitionManager to use the default transition.
421 public static void beginDelayedTransition(final ViewGroup sceneRoot, Transition transition) {
424 Log.d(LOG_TAG, "beginDelayedTransition: root, transition = " +
425 sceneRoot + ", " + transition);
428 if (transition == null) {
429 transition = sDefaultTransition;
431 final Transition transitionClone = transition.clone();
451 final Transition transition = copy.get(i);
452 transition.forceToEnd(sceneRoot);