Skip to content

PopPsyA/MagicTip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MagicTip

Android Arsenal

20191114_151821

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'