AndroidViewAnimations:Andorid视图动画合集YOYO
一天我看見一個ios動畫效果庫? ?AFViewShaker, 它實現的效果很贊, 我認為Android 也需要一個這樣的庫,所以過了兩天,我就自己創建了這個項目。
使用
為了把效果做的很逼真,我創建了另外一個項目叫做,Android Easing Functions?,是一些簡單功能的實現,我們需要引入那個項目。
Gradle
Java| 12345 | dependencies {????????compile 'com.nineoldandroids:library:2.4.0'????????compile 'com.daimajia.easing:library:1.0.0@aar'????????compile 'com.daimajia.androidanimations:library:1.1.2@aar'} |
maven
Java| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | <dependency> ????<groupId>com.nineoldandroids</groupId> ????<artifactId>library</artifactId> ????<version>2.4.0</version> </dependency> <dependency> ????<groupId>com.daimajia.androidanimation</groupId> ????<artifactId>library</artifactId> ????<version>1.1.2</version> ????<type>apklib</type> </dependency> <dependency> ????<groupId>com.daimajia.easing</groupId> ????<artifactId>library</artifactId> ????<version>1.0.0</version> ????<type>apklib</type> </dependency> |
或者下載下面的庫到你的eclipse項目中
- NineOldAndroid-2.4.0
- AndroidEasingFunctions-1.0.0
- AndroidViewAnimations-1.1.2
使用
就像玩Yo-y0 一樣簡單
Java| 1 2 3 | YoYo.with(Techniques.Tada) ????.duration(700) ????.playOn(findViewById(R.id.edit_area)); |
總共有一下效果
Attension
Flash,?Pulse,?RubberBand,?Shake,?Swing,?Wobble,?Bounce,?Tada,?StandUp,?Wave
Special
Hinge,?RollIn,?RollOut,Landing,TakingOff,DropOut
Bounce
BounceIn,?BounceInDown,?BounceInLeft,?BounceInRight,?BounceInUp
Fade
FadeIn,?FadeInUp,?FadeInDown,?FadeInLeft,?FadeInRight
FadeOut,?FadeOutDown,?FadeOutLeft,?FadeOutRight,?FadeOutUp
Flip
FlipInX,?FlipOutX,?FlipOutY
Rotate
RotateIn,?RotateInDownLeft,?RotateInDownRight,?RotateInUpLeft,?RotateInUpRight
RotateOut,?RotateOutDownLeft,?RotateOutDownRight,?RotateOutUpLeft,?RotateOutUpRight
Slide
SlideInLeft,?SlideInRight,?SlideInUp,?SlideInDown
SlideOutLeft,?SlideOutRight,?SlideOutUp,?SlideOutDown
Zoom
ZoomIn,?ZoomInDown,?ZoomInLeft,?ZoomInRight,?ZoomInUp
ZoomOut,?ZoomOutDown,?ZoomOutLeft,?ZoomOutRight,?ZoomOutUp
github項目地址https://github.com/daimajia/AndroidViewAnimations
總結
以上是生活随笔為你收集整理的AndroidViewAnimations:Andorid视图动画合集YOYO的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 免费的java外文文献,JAVA外文文献
- 下一篇: win10环境下AndroidStudi