Awesome library in Kotlin using the view animation system to perform tweened animations on Views based on daimajia/AndroidViewAnimations
build.gradle
of project gradle dependencyallprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
build.gradle
of app gradle dependencydependencies {
implementation 'com.github.gayanvoice:android-animations-kotlin:1.0.1'
}
build.gradle
of project gradle dependency<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
build.gradle
of module gradle dependency<dependency>
<groupId>com.github.gayanvoice</groupId>
<artifactId>android-animations-kotlin</artifactId>
<version>1.0.1</version>
</dependency>
import render.animations.*;
// 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();
import render.animations.*
// Declare TextView
val textView: TextView = findViewById(R.id.TextView)
// Create Render Class
val render = Render(this)
// Set Animation
render.setAnimation(Bounce().InDown(textView))
render.start()
To animate the view, add the class name and specific animation method namesetAnimation
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 |
|||
---|---|---|---|
Bounce |
Flash |
||
Pulse |
Ruberband |
||
Shake |
Standup |
||
Swing |
Tada |
||
Wave |
Wobble |
Bounce |
|||
---|---|---|---|
InDown |
InUp |
||
InLeft |
InRight |
||
In |
Fade |
|||
---|---|---|---|
InDown |
InUp |
||
InLeft |
InRight |
||
OutDown |
OutUp |
||
OutLeft |
OutRight |
||
In |
Out |
Flip |
|||
---|---|---|---|
InX |
InY |
||
OutX |
OutY |
Rotate |
|||
---|---|---|---|
InDownLeft |
InDownRight |
||
InUpLeft |
InUpRight |
||
OutDownLeft |
OutDownRight |
||
OutUpLeft |
OutUpRight |
||
In |
Out |
Slide |
|||
---|---|---|---|
InDown |
InUp |
||
InLeft |
InRight |
||
OutDown |
OutUp |
||
OutLeft |
OutRight |
Zoom |
|||
---|---|---|---|
InDown |
InUp |
||
InLeft |
InRight |
||
OutDown |
OutUp |
||
OutLeft |
OutRight |
||
In |
Out |
This android view animations library supports number of animations. Go to the java version of this library to see the gallery of animations. Click here https://github.com/gayanvoice/android-view-animations-java#animations
Git
from Check out project from Version Control
in your Android StudioClone
buttonYes
to open the repositoryBuild
using the latest Gradle
versionGo to https://github.com/gayanvoice/android-vpn-client-ics-openvpn#develop see the steps
This library is based on https://github.com/daimajia/AndroidViewAnimations and the Java version of this library is available in https://github.com/gayanvoice/android-view-animations-java