Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/linfaxin/TransitionPlayer
Android library to control Transition animates. A simple way to create a interactive animation.
https://github.com/linfaxin/TransitionPlayer
Last synced: about 1 month ago
JSON representation
Android library to control Transition animates. A simple way to create a interactive animation.
- Host: GitHub
- URL: https://github.com/linfaxin/TransitionPlayer
- Owner: linfaxin
- Created: 2015-08-09T11:25:11.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-07-13T03:45:04.000Z (over 8 years ago)
- Last Synced: 2024-10-30T04:50:00.079Z (about 1 month ago)
- Language: Java
- Size: 1.89 MB
- Stars: 1,155
- Watchers: 45
- Forks: 223
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-github-android-ui - TransitionPlayer - 控制过渡动画的Android库 (页面切换)
README
# TransitionPlayer
Android library to control Transition animates. A simple way to create a interactive animation.## Demo1 SimpleTransition
![image](demo/demo_drawerlayout.gif)
### Code:
```java
......
TransitionManager.beginDelayedTransition(mSceneRoot, transitionPlayer);imageView.setRotation(360);
imageView.setRotationX(270);
imageView.setRotationY(180);
imageView.setTranslationX(70 * getResources().getDisplayMetrics().density);
imageView.setScaleX(0.2f);
imageView.setScaleY(0f);
imageView.setBackgroundColor(getResources().getColor(android.R.color.holo_blue_bright));
......
drawerLayout.setDrawerListener(new DrawerLayout.SimpleDrawerListener() {
public void onDrawerSlide(View drawerView, float slideOffset) {
transitionPlayer.setCurrentFraction(slideOffset);
}
});
```## Demo2 MaterialMenu
![image](demo/demo_menu.gif)
### Code:
```java
......
int[] layouts = new int[]{R.layout.material_menu_option, R.layout.material_menu_back, R.layout.material_menu_y};
Scene scene = Scene.getSceneForLayout(mSceneRoot, layout[random.nextInt(layouts.length)], context);
TransitionManager.go(scene, transitionPlayer);
......
drawerLayout.setDrawerListener(new DrawerLayout.SimpleDrawerListener() {
public void onDrawerSlide(View drawerView, float slideOffset) {
transitionPlayer.setCurrentFraction(slideOffset);
}
});
```## Demo3 ChromeAppIndexPage
![image](demo/demo_chrome_home.gif)
### Code:
[ChromeHomeDemo.java](demo/src/main/java/com/linfaxin/transitionplayer/demo/ChromeHomeDemo.java)## License
MIT License.