Coder Social home page Coder Social logo

mdeora / android-animations-kotlin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gayanvoice/android-animations-kotlin

0.0 1.0 0.0 178 KB

Awesome library in Kotlin using the view animation system to perform tweened animations on Views based on daimajia/AndroidViewAnimations

License: MIT License

Kotlin 100.00%

android-animations-kotlin's Introduction

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.gayanvoice:android-animations-kotlin:1.0.1'
}

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.gayanvoice</groupId>
	<artifactId>android-animations-kotlin</artifactId>
	<version>1.0.1</version>
</dependency>

Usage

Java

Import render animations

import render.animations.*;

Start animation

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

Kotlin

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

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

Bounce

Bounce
InDown portfolio_view InUp portfolio_view
InLeft portfolio_view InRight portfolio_view
In portfolio_view

Fade

Fade
InDown portfolio_view InUp portfolio_view
InLeft portfolio_view InRight portfolio_view
OutDown portfolio_view OutUp portfolio_view
OutLeft portfolio_view OutRight portfolio_view
In portfolio_view Out portfolio_view

Flip

Flip
InX portfolio_view InY portfolio_view
OutX portfolio_view OutY portfolio_view

Rotate

Rotate
InDownLeft portfolio_view InDownRight portfolio_view
InUpLeft portfolio_view InUpRight portfolio_view
OutDownLeft portfolio_view OutDownRight portfolio_view
OutUpLeft portfolio_view OutUpRight portfolio_view
In portfolio_view Out portfolio_view

Slide

Slide
InDown portfolio_view InUp portfolio_view
InLeft portfolio_view InRight portfolio_view
OutDown portfolio_view OutUp portfolio_view
OutLeft portfolio_view OutRight portfolio_view

Zoom

Zoom
InDown portfolio_view InUp portfolio_view
InLeft portfolio_view InRight portfolio_view
OutDown portfolio_view OutUp portfolio_view
OutLeft portfolio_view OutRight portfolio_view
In portfolio_view Out 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/gayanvoice/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/gayanvoice/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/gayanvoice/android-view-animations-java

android-animations-kotlin's People

Contributors

example123 avatar gayanvoice avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.