Skip to content

Awesome library in Kotlin, using the view animation system to perform tweened animations on Views

License

Notifications You must be signed in to change notification settings

septe01/android-view-animations-kotlin

Repository files navigation

Android View Animations in Kotlin

Build Status API GitHub code size in bytes

Android View Animations in Java Android View Animations in Java

Get

Gradle

  1. Add this to build.gradle of project gradle dependency
allprojects {
	repositories {
		...
 		maven { url 'https://jitpack.io' }
	}
}
  1. Add this to build.gradle of app gradle dependency
dependencies {
	implementation 'com.github.gayankuruppu:android-view-animations-kotlin:1.0.0'
}

Or

Maven

  1. Add this to build.gradle of project gradle dependency
<repositories>
	<repository>
		<id>jitpack.io</id>
	    	<url>https://jitpack.io</url>
	</repository>
</repositories>
  1. Add this to build.gradle of module gradle dependency
<dependency>
	<groupId>com.github.gayankuruppu</groupId>
	<artifactId>android-view-animations-kotlin</artifactId>
	<version>1.0.0</version>
</dependency>

Usage

Import render animations

import render.animations.*;

Start animation

// 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()

Animations

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 portfolio_view Flash portfolio_view
Pulse portfolio_view Ruberband portfolio_view
Shake portfolio_view Standup portfolio_view
Swing portfolio_view Tada portfolio_view
Wave portfolio_view Wobble portfolio_view

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/gayankuruppu/android-view-animations-java#animations

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 version

Go to https://github.com/gayankuruppu/android-vpn-client-ics-openvpn#develop see the steps

Thanks

This library is based on https://github.com/daimajia/AndroidViewAnimations and the Java version of this library is available in https://github.com/gayankuruppu/android-view-animations-java

About

Awesome library in Kotlin, using the view animation system to perform tweened animations on Views

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Kotlin 100.0%