Trevor Johns | e904b62 | 2014-08-27 18:30:35 -0700 | [diff] [blame] | 1 | |
Trevor Johns | 89d2da0 | 2015-08-13 18:28:15 -0700 | [diff] [blame] | 2 | Android BasicTransition Sample |
| 3 | =================================== |
| 4 | |
| 5 | A basic app showing how to use the Transition framework introduced in |
| 6 | KitKat. The app shows radioboxes to select between different Scenes, |
| 7 | and uses various ways to transition between them. |
| 8 | |
| 9 | Introduction |
| 10 | ------------ |
| 11 | |
| 12 | A Scene is an encapsulation of the state of a view hierarchy, |
| 13 | including the views in that hierarchy and the various values |
| 14 | (layout-related and otherwise) that those views have. A scene can be |
| 15 | defined by a layout hierarchy directly or by code which sets up the |
| 16 | scene dynamically as it is entered. |
| 17 | |
| 18 | A Transition is a mechanism to automatically animate changes that |
| 19 | occur when a new scene is entered. Some transition capabilities are |
| 20 | automatic. That is, entering a scene may cause animations to run which |
| 21 | fade out views that go away, changeBounds and resize existing views |
| 22 | that change, and fade in views that become visible. There are |
| 23 | additional transitions that can animate other attributes, such as |
| 24 | color changes, and which can optionally be specified to take place |
| 25 | during particular scene changes. Finally, developers can define their |
| 26 | own Transition subclasses which monitor particular property changes |
| 27 | and which run custom animations when those properties change values. |
| 28 | |
| 29 | TransitionManager is used to specify custom transitions for particular |
| 30 | scene changes, and to cause scene changes with specific transitions to |
| 31 | take place. |
Trevor Johns | e904b62 | 2014-08-27 18:30:35 -0700 | [diff] [blame] | 32 | |
| 33 | Pre-requisites |
| 34 | -------------- |
| 35 | |
Trevor Johns | 89d2da0 | 2015-08-13 18:28:15 -0700 | [diff] [blame] | 36 | - Android SDK v23 |
Trevor Johns | d8cda51 | 2015-08-14 16:18:25 -0700 | [diff] [blame^] | 37 | - Android Build Tools v23.0.0 |
Trevor Johns | e904b62 | 2014-08-27 18:30:35 -0700 | [diff] [blame] | 38 | - Android Support Repository |
| 39 | |
Trevor Johns | 89d2da0 | 2015-08-13 18:28:15 -0700 | [diff] [blame] | 40 | Screenshots |
| 41 | ------------- |
| 42 | |
| 43 | <img src="screenshots/main.png" height="400" alt="Screenshot"/> |
| 44 | |
Trevor Johns | e904b62 | 2014-08-27 18:30:35 -0700 | [diff] [blame] | 45 | Getting Started |
| 46 | --------------- |
| 47 | |
| 48 | This sample uses the Gradle build system. To build this project, use the |
| 49 | "gradlew build" command or use "Import Project" in Android Studio. |
| 50 | |
| 51 | Support |
| 52 | ------- |
| 53 | |
| 54 | - Google+ Community: https://plus.google.com/communities/105153134372062985968 |
| 55 | - Stack Overflow: http://stackoverflow.com/questions/tagged/android |
| 56 | |
| 57 | If you've found an error in this sample, please file an issue: |
| 58 | https://github.com/googlesamples/android-BasicTransition |
| 59 | |
| 60 | Patches are encouraged, and may be submitted by forking this project and |
| 61 | submitting a pull request through GitHub. Please see CONTRIBUTING.md for more details. |
| 62 | |
| 63 | License |
| 64 | ------- |
| 65 | |
| 66 | Copyright 2014 The Android Open Source Project, Inc. |
| 67 | |
| 68 | Licensed to the Apache Software Foundation (ASF) under one or more contributor |
| 69 | license agreements. See the NOTICE file distributed with this work for |
| 70 | additional information regarding copyright ownership. The ASF licenses this |
| 71 | file to you under the Apache License, Version 2.0 (the "License"); you may not |
| 72 | use this file except in compliance with the License. You may obtain a copy of |
| 73 | the License at |
| 74 | |
Trevor Johns | 89d2da0 | 2015-08-13 18:28:15 -0700 | [diff] [blame] | 75 | http://www.apache.org/licenses/LICENSE-2.0 |
Trevor Johns | e904b62 | 2014-08-27 18:30:35 -0700 | [diff] [blame] | 76 | |
| 77 | Unless required by applicable law or agreed to in writing, software |
| 78 | distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 79 | WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 80 | License for the specific language governing permissions and limitations under |
| 81 | the License. |