Git Product home page Git Product logo

animationx's Introduction

Release

AnimationX

An simple & awesome animation library written in Kotlin for Android

Screenshots

Success

Documentation

Installation


Step 1. Add the JitPack repository to your build file s

	allprojects {
		repositories {
			maven { url 'https://jitpack.io' }
		}
	}

Step 2. Add the dependency

	dependencies {
	        implementation 'com.github.rommansabbir:AnimationX:{Version}'
	}

Version available

Releases
2.0

Whats new in this version?

  • Added Animation Listener
  • Performance Improved

Usages

    /**
     * Animation can be applied to all views which extends [View]
     * Just call the extension function's according to your requirement
     * To show animation according to your requirement, call the extension function & pass the animation key
     */
     

    /**
    * To show attention animation, call [animationXAttention] & pass the animation key
    */
        imageView.animationXAttention(Attention.ATTENTION_BOUNCE, duration = 500, listener = object : Animator.AnimatorListener{
            override fun onAnimationStart(p0: Animator?) {
                TODO("Not yet implemented")
            }

            override fun onAnimationEnd(p0: Animator?) {
                TODO("Not yet implemented")
            }

            override fun onAnimationCancel(p0: Animator?) {
                TODO("Not yet implemented")
            }

            override fun onAnimationRepeat(p0: Animator?) {
                TODO("Not yet implemented")
            }

        })


    /**
    * To show bounce animation, call [animationXBounce] & pass the animation key
    */
    imageView.animationXBounce(Bounce.BOUNCE_IN)
        

    /**
    * To show fade animation, call [animationXFade] & pass the animation key
    */
    imageView.animationXFade(Fade.FADE_IN_DOWN)
    

    /**
    * To show flip animation, call [animationXFlip] & pass the animation key
    */
    imageView.animationXFlip(Flip.FLIP_IN_X)
        

    /**
    * To show rotate animation, call [animationXRotate] & pass the animation key
    */
    imageView.animationXRotate(Rotate.ROTATE_IN)


    /**
    * To show slide animation, call [animationXSlide] & pass the animation key
    */
    imageView.animationXSlide(Slide.SLIDE_IN_DOWN)


    
    /**
    * To show zoom animation, call [animationXZoom] & pass the animation key
    */
    imageView.animationXZoom(Zoom.ZOOM_IN_DOWN)
    

    /**
     * On the other hand, if you want to show animation manually
     */
     AnimationX().setDuration(2000)
     .setAnimation(Attention.bounce(imageView, AnimationX().getNewAnimatorSet())).start()

Animations

Default value for duration is 1000 Milliseconds.

Class Name
Attention Bounce Fade Flip Rotate Slide Zoom

Attention

Attention
ATTENTION_BOUNCE portfolio_view ATTENTION_FLASH portfolio_view
ATTENTION_PULSE portfolio_view ATTENTION_RUBERBAND portfolio_view
ATTENTION_SHAKE portfolio_view ATTENTION_STAND_UP portfolio_view
ATTENTION_SWING portfolio_view ATTENTION_TA_DA portfolio_view
ATTENTION_WAVE portfolio_view Wobble portfolio_view

Bounce

Bounce
BOUNCE_IN_DOWN portfolio_view BOUNCE_IN_UP portfolio_view
BOUNCE_IN_LEFT portfolio_view BOUNCE_IN_RIGHT portfolio_view
BOUNCE_IN portfolio_view

Fade

Fade
FADE_IN_DOWN portfolio_view FADE_IN_UP portfolio_view
FADE_IN_LEFT portfolio_view FADE_IN_RIGHT portfolio_view
FADE_OUT_DOWN portfolio_view FADE_OUT_UP portfolio_view
FADE_OUT_LEFT portfolio_view FADE_OUT_RIGHT portfolio_view
FADE_IN portfolio_view FADE_OUT portfolio_view

Flip

Flip
FLIP_IN_X portfolio_view FLIP_IN_Y portfolio_view
FLIP_OUT_X portfolio_view FLIP_OUT_Y portfolio_view

Rotate

Rotate
ROTATE_IN_DOWN_LEFT portfolio_view ROTATE_IN_DOWN_RIGHT portfolio_view
ROTATE_IN_UP_LEFT portfolio_view ROTATE_IN_UP_RIGHT portfolio_view
ROTATE_OUT_DOWN_LEFT portfolio_view ROTATE_OUT_DOWN_RIGHT portfolio_view
ROTATE_OUT_UP_LEFT portfolio_view ROTATE_OUT_UP_RIGHT portfolio_view
ROTATE_IN portfolio_view ROTATE_OUT portfolio_view

Slide

Slide
SLIDE_IN_DOWN portfolio_view SLIDE_IN_UP portfolio_view
SLIDE_IN_LEFT portfolio_view SLIDE_IN_RIGHT portfolio_view
SLIDE_OUT_DOWN portfolio_view SLIDE_OUT_UP portfolio_view
SLIDE_OUT_LEFT portfolio_view SLIDE_OUT_RIGHT portfolio_view

Zoom

Zoom
ZOOM_IN_DOWN portfolio_view ZOOM_IN_UP portfolio_view
ZOOM_IN_LEFT portfolio_view ZOOM_IN_RIGHT portfolio_view
ZOOM_OUT_DOWN portfolio_view ZOOM_OUT_UP portfolio_view
ZOOM_OUT_LEFT portfolio_view ZOOM_OUT_RIGHT portfolio_view
ZOOM_IN portfolio_view ZOOM_OUT portfolio_view

This library has been developed based on daimajia/AndroidViewAnimations

Contact me

Portfolio | LinkedIn | Twitter | Facebook

License


Apache Version 2.0

Copyright (C) 2020 Romman Sabbir

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

		http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

animationx's People

Contributors

rommansabbir avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

animationx's Issues

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.