/ Animations

A simple & awesome animation library written in Kotlin for Android

A simple & awesome animation library written in Kotlin for Android

AnimationX

A simple & awesome animation library written in Kotlin for Android.

AnimationX

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
1.0
1.0.1

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)


    /**
    * 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

GitHub

Comments