README.md
1Android FragmentTransition Sample
2===================================
3
4This sample demonstrates how to start a Transition after a Fragment Transaction.
5
6Introduction
7------------
8
9This sample uses [the Transition framework][1] to show a nice visual effect on
10Fragment Transaction.
11
12Animation for fragment _transaction_ can be customized by overriding
13[onCreateAnimation][2]. In this sample, we set up an AnimationListener
14for this Animation, and start our Transition on [onAnimationEnd][3].
15
16Transition is started by calling [TransitionManager.go][4]. We don't
17instantiate a Scene for the initial state of Transition, as we never
18go back. One thing we need to be careful here is that we need to
19populate the content of Views after starting the Transition.
20
21[1]: https://developer.android.com/reference/android/transition/package-summary.html
22[2]: http://developer.android.com/reference/android/support/v4/app/Fragment.html#onCreateAnimation(int, boolean, int)
23[3]: http://developer.android.com/reference/android/view/animation/Animation.AnimationListener.html#onAnimationEnd(android.view.animation.Animation)
24[4]: http://developer.android.com/reference/android/transition/TransitionManager.html#go(android.transition.Scene)
25
26Pre-requisites
27--------------
28
29- Android SDK v21
30- Android Build Tools v21.1.1
31- Android Support Repository
32
33Screenshots
34-------------
35
36<img src="screenshots/grid.png" height="400" alt="Screenshot"/> <img src="screenshots/main.png" height="400" alt="Screenshot"/>
37
38Getting Started
39---------------
40
41This sample uses the Gradle build system. To build this project, use the
42"gradlew build" command or use "Import Project" in Android Studio.
43
44Support
45-------
46
47- Google+ Community: https://plus.google.com/communities/105153134372062985968
48- Stack Overflow: http://stackoverflow.com/questions/tagged/android
49
50If you've found an error in this sample, please file an issue:
51https://github.com/googlesamples/android-FragmentTransition
52
53Patches are encouraged, and may be submitted by forking this project and
54submitting a pull request through GitHub. Please see CONTRIBUTING.md for more details.
55
56License
57-------
58
59Copyright 2014 The Android Open Source Project, Inc.
60
61Licensed to the Apache Software Foundation (ASF) under one or more contributor
62license agreements. See the NOTICE file distributed with this work for
63additional information regarding copyright ownership. The ASF licenses this
64file to you under the Apache License, Version 2.0 (the "License"); you may not
65use this file except in compliance with the License. You may obtain a copy of
66the License at
67
68http://www.apache.org/licenses/LICENSE-2.0
69
70Unless required by applicable law or agreed to in writing, software
71distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
72WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
73License for the specific language governing permissions and limitations under
74the License.
75