https://github.com/naman14/playanimations
A demo of various animation in latest PlayGames app
https://github.com/naman14/playanimations
Last synced: 21 days ago
JSON representation
A demo of various animation in latest PlayGames app
- Host: GitHub
- URL: https://github.com/naman14/playanimations
- Owner: naman14
- Created: 2015-05-30T15:10:45.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-02-26T20:41:39.000Z (about 9 years ago)
- Last Synced: 2025-03-31T16:16:31.077Z (28 days ago)
- Language: Java
- Size: 3.99 MB
- Stars: 410
- Watchers: 14
- Forks: 73
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PlayAnimations
A demo of various animation in latest PlayGames app using the Transition framework of Android.Minimum SDK>21. This is not a backport of Transition Framework. This demo works above Lollipop only.
http://blog.naman-dwivedi.in/transition-framework-android
[Google Play](https://play.google.com/store/apps/details?id=com.naman14.playanimations) | [Youtube](https://www.youtube.com/watch?v=qXtL5AhA3V0)

#Usage
When launching another activity,specify the views where you want to perform transition and pass it as a bundle. The launching activity and the launched activity should have common views to perform transition on that pair of views.```java
Intent intent=new Intent(mContext, DetailActivity.class);
ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(MainActivity.getInstance(), Pair.create((View) cover, "cover"));
mContext.startActivity(intent,options.toBundle());
```
Specify the attribute android:transitionName="cover" in both the view of two activities.Transition framework will look for the views with same transitionName attribute and will apply the auto transition on them.We will specify the transition in our theme. Add this attribute to your v21 theme
```xml
@transition/shared_element
```We will define our own custom Transition instead of the default Transition.
#####res/transition/shared_element.xml
```xml
/>
```
[PlayTransition.java](https://github.com/naman14/PlayAnimations/blob/master/app/src/main/java/com/naman14/playanimations/PlayTransition.java)
# License
>(c) 2015 Naman Dwivedi>PlayAnimations is a free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
>This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
>You should have received a copy of the GNU General Public License along with this app. If not, see .