https://github.com/gayanvoice/android-animations
Perform tweened animations such as Attention, Bounce, Fade, Flip, Rotate, Slide and Zoom on Views
https://github.com/gayanvoice/android-animations
android animation animation-effects easing-functions view viewanimator
Last synced: 2 months ago
JSON representation
Perform tweened animations such as Attention, Bounce, Fade, Flip, Rotate, Slide and Zoom on Views
- Host: GitHub
- URL: https://github.com/gayanvoice/android-animations
- Owner: gayanvoice
- License: mit
- Created: 2019-09-18T07:04:46.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-11-30T13:03:13.000Z (over 2 years ago)
- Last Synced: 2025-04-15T03:54:16.743Z (2 months ago)
- Topics: android, animation, animation-effects, easing-functions, view, viewanimator
- Language: Java
- Homepage: https://git.io/JeCRG
- Size: 4.26 MB
- Stars: 153
- Watchers: 6
- Forks: 27
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Android View Animations in Java
[](https://travis-ci.org/gayanvoice/android-animations) [](https://jitpack.io/#gayanvoice/android-view-animations-java) [](https://android-arsenal.com/api?level=14) 
![]()
## Get
### Gradle
1. Add this to `build.gradle` of project gradle dependency```groovy
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
```2. Add this to `build.gradle` of app gradle dependency
```groovy
dependencies {
implementation 'com.github.gayanvoice:android-animations:1.0.2'
}
```### Or
### Maven
1. Add this to `build.gradle` of project gradle dependency
```xml
jitpack.io
https://jitpack.io
```
2. Add this to `build.gradle` of module gradle dependency
```xml
com.github.gayanvoice
android-animations
1.0.2```
## Usage
### Import render animations```java
import render.animations.*;
```### Start animation
```java
// Declare TextView
TextView AppleText = findViewById(R.id.TextView);// Create Render Class
Render render = new Render(MainActivity.this);// Set Animation
render.setAnimation(Attention.Wobble(AppleText));
render.start();
```## Animations
To animate the view, add the class name and specific animation method name`setAnimation` to an view. You can include the method `setDuration` to specify duration of animation. Default value for `duration` is `1000 Milliseconds`. Finally you need to add one of the following classes to the view:
| Class Name | | | | | | |
| ----------- | ----------- | ----------- | ----------- | ----------- | ----------- | ----------- |
| `Attention` | `Bounce` | `Fade` | `Flip ` | `Rotate` | `Slide` | `Zoom` |### Attention
| `Attention` | | | |
| ----------------- | ------------------ | ------------------ | ------------------ |
| `Bounce`|| `Flash` |
|
| `Pulse` || `Ruberband` |
|
| `Shake` || `Standup` |
|
| `Swing` || `Tada` |
|
| `Wave` || `Wobble` |
|
### Bounce
| `Bounce` | | | |
| ----------------- | ------------------ | ------------------ | ------------------ |
| `InDown` || `InUp` |
|
| `InLeft` || `InRight` |
|
| `In` || | |
### Fade
| `Fade` | | | |
| ----------------- | ------------------ | ------------------ | ------------------ |
| `InDown` || `InUp` |
|
| `InLeft` || `InRight` |
|
| `OutDown` || `OutUp` |
|
| `OutLeft` || `OutRight` |
|
| `In` || `Out` |
|
### Flip
| `Flip` | | | |
| ----------------- | ------------------ | ------------------ | ------------------ |
| `InX` || `InY` |
|
| `OutX` || `OutY` |
|
### Rotate
| `Rotate` | | | |
| ----------------- | ------------------ | ------------------ | ------------------ |
| `InDownLeft` || `InDownRight` |
|
| `InUpLeft` || `InUpRight` |
|
| `OutDownLeft` || `OutDownRight` |
|
| `OutUpLeft` || `OutUpRight` |
|
| `In` || `Out` |
|
### Slide
| `Slide` | | | |
| ----------------- | ------------------ | ------------------ | ------------------ |
| `InDown` || `InUp` |
|
| `InLeft` || `InRight` |
|
| `OutDown` || `OutUp` |
|
| `OutLeft` || `OutRight` |
|
### Zoom
| `Zoom` | | | |
| ----------------- | ------------------ | ------------------ | ------------------ |
| `InDown` || `InUp` |
|
| `InLeft` || `InRight` |
|
| `OutDown` || `OutUp` |
|
| `OutLeft` || `OutRight` |
|
| `In` || `Out` |
|
## Develop the library
1. Select `Git` from `Check out project from Version Control` in your Android Studio
2. Paste the repository url and click `Clone` button
3. Click `Yes` to open the repository
4. `Build` using the latest `Gradle` versionGo to https://github.com/gayanvoice/android-vpn-client-ics-openvpn#develop see the steps
## Thanks
This library is based on https://github.com/daimajia/AndroidViewAnimations and the Kotlin version of this library is available in https://github.com/gayanvoice/android-view-animations-kotlin