MagicTip(anchorView)
.settings {
text = "Lorem Posen"
bgColor = Color.RED
}
.show()
AutoCloseMagicTip by default close tip after 1000 milliseconds. You can change it in the constructor:
AutoCloseMagicTip(anchorView, delayMillis)
.settings {
text = "Lorem Posen"
bgColor = Color.GREEN
}
.show()
OneMagicTip - it is decorator that shows only 1 MagicTip.
OneMagicTip(anchorView, MagicTip(anchorView)
.settings {
text = "Lorem Posen"
bgColor = Color.BLUE
})
.show()
In the MagicTip.(view).settings{ }
block of code you have access to startAnimationDelegate
and exitAnimationDelegate
.
Don't forget to set Reversed version of animation on exitAnimationDelegate
. For example if startAnimationDelegate = OvershootMagicTipAnimation()
then exitAnimationDelegate = OvershootMagicTipAnimation.Reversed()
Set of animations:
- AlphaMagicTipAnimation
- OvershootMagicTipAnimation
- ScaledTranslateMagicTipAnimation
implementation 'com.github.Devit951:MagicTip:1.0.0'