Makes a view fluctuate.
- 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' }
}
}
- Add the dependency
dependencies {
implementation 'com.github.paolorotolo:viewgardiumleviosa:1.0.0'
}
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()