AndroidViewAnimations README

The project's README from github.com/daimajia/AndroidViewAnimations. As one markdown file: README.md.

Android View Animations Build Status

One day, I saw an iOS library, which is a view shaker, it's very beautiful. I think Android also need one, and should be better.

So, I started to collect animation effects... and in two days, this project born.

Demo

Download Demo

Usage

Since Version 2.0, NineOldAndroids has been removed. Thanks Jake Wharton.

For making animations more real, I created another project named Android Easing Functions which is an implementations of easing functions on Android. So, we need to dependent that project.

Step 1

Gradle

dependencies {
    implementation 'com.daimajia.androidanimations:library:2.4@aar'
}

Maven

<dependency>
    <groupId>com.daimajia.androidanimation</groupId>
    <artifactId>library</artifactId>
    <version>2.4</version>
</dependency>

Step 2

Just like play Yo-yo.

YoYo.with(Techniques.Tada)
    .duration(700)
    .repeat(5)
    .playOn(findViewById(R.id.edit_area));

Effects

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

Welcome contribute your amazing animation effect. :-D

Thanks

Why YoYo?

YoYo is a toy, with a lot of Techniques.

About me

(2013) A student in mainland China.

Welcome to offer me an internship. If you have any new idea about this project, feel free to contact me.

(2019) Five years later, now I become an investment associate in China.

Welcome to send your business plan to me. Maybe I would have a better understanding on your startup project than others. Trust me.

AndroidViewAnimations (daimajia/AndroidViewAnimations)

Searching Database…

这是什么?AndroidViewAnimations 是一套为 Android 准备的现成视图动画效果,包括 Flash、Pulse、Shake、Bounce、FadeIn、Zoom 等多种效果,只需几行代码就能应用到任意视图上。
这是独立应用,还是我要添加到项目里的库?这是一个 Android 库(Java 编写),需要作为 Gradle 或 Maven 依赖添加到你的 Android 项目中,而不是独立应用。
我该怎么把它添加到项目中并使用?通过 Gradle 或 Maven 添加该库,然后像玩悠悠球一样给视图施加动画效果(例如用 YoYo.with(Techniques.Pulse).playOn(view) 为视图添加效果)。
做动画计算还需要额外的库吗?需要。它依赖作者另一个项目 'Android Easing Functions' 提供缓动函数的实现;自 2.0 版本起,NineOldAndroids 已不再作为依赖。
这个项目还在积极维护吗?没有明确说明。但作者 2019 年的笔记提到,他在创建本项目五年后已转行做投资助理,这表明该项目可能很少再有积极的开发。
包含哪些类型的效果?分类包括 Attention(Flash、Pulse、Shake、Swing、Wobble、Bounce、Tada、StandUp、Wave)、Special(Hinge、RollIn/Out、Landing、TakingOff、DropOut)、Bounce、Fade、Flip、Rotate、Slide,以及 Zoom 的 in/out 变体。
为什么叫 YoYo?触发动画的 API 名为 YoYo,因为和这种玩具一样,它涉及大量来回往复的动画技巧。
这个库的灵感从何而来?作者看到一个 iOS 视图抖动库后,认为 Android 也需要类似的东西,于是用大约两天时间做出了这套效果集合。
Creator
daimajia
Size
0.3 MB
Stars
12.4K
Age
12y
Commits · 90 Days