Skip to content

Latest commit

 

History

History
46 lines (36 loc) · 973 Bytes

README.md

File metadata and controls

46 lines (36 loc) · 973 Bytes

ViewGardiumLeviosa

Makes a view fluctuate.

Import

  1. Add the JitPack repository to your build file

Add it in your root build.gradle at the end of repositories:

	allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}
  1. Add the dependency
	dependencies {
	        implementation 'com.github.paolorotolo:viewgardiumleviosa:1.0.0'
	}

Usage

ViewGardiumLeviosa adds an extension method to your Views.

You can make the view fluctuate with:

view.startFluctuate()

If you want to customize the animation, you can specify the max delta and the duration of one animcaiton cycle:

val fluctuateDelta = -50
val fluctuateDuration = 500

view.startFluctuate(fluctuateDelta, fluctuateDuration)

Finally, to stop the animation, call:

view.stopFluctuate()