A fluent tooltip for Android
ViewTooltip
A fluent tooltip for Android.
ViewTooltip
ViewTooltip
.on(this, editText)
.autoHide(true, 1000)
.corner(30)
.position(ViewTooltip.Position.RIGHT)
.text("Right")
.show();
Download
dependencies {
compile 'com.github.florent37:viewtooltip:(last version)'
}
Methods
ViewTooltip
.on(this, editText)
.autoHide(true / false, 1000)
.clickToHide(true / false)
.align(START / CENTER)
.position(TOP / LEFT / RIGHT / BOTTOM)
.text("The text")
.textColor(Color.WHITE)
.color(Color.BLACK)
.corner(10)
.arrowWidth(15)
.arrowHeight(15)
.distanceWithView(0)
//change the opening animation
.animation(new ViewTooltip.TooltipAnimation(){...})
//listeners
.onDisplay(new ViewTooltip.ListenerDisplay() {
@Override
public void onDisplay(View view) {
}
})
.onHide(new ViewTooltip.ListenerHide() {
@Override
public void onHide(View view) {
}
})
.show();
Prevent view to not be outside screen
ViewTooltip will not allow to be outside of screen,
it will automatically adjust his size