MagicTip

Additional

Language
Kotlin
Version
1.0.0 (Nov 14, 2019)
Created
Nov 4, 2019
Updated
Nov 29, 2019
Owner
Ildarov (Devit951)
Contributor
Ildarov (Devit951)
1
Activity
Badge
Generate
Download
Source code
APK file

Show card

MagicTip

Simple MagicTip

MagicTip(anchorView)
                    .settings {
                        text = "Lorem Posen"
                        bgColor = Color.RED
                    }
                    .show()
             

AutoCloseMagicTip

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

OneMagicTip - it is decorator that shows only 1 MagicTip.

OneMagicTip(anchorView, MagicTip(anchorView)
                   .settings {
                       text = "Lorem Posen"
                       bgColor = Color.BLUE
                   })
                   .show()

How to use animations?

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

Download

implementation 'com.github.Devit951:MagicTip:1.0.0'