How to create a helpful tooltip in Android

32,387

Solution 1

For anyone just joining us from searching this.

This is a better Holo solution https://gist.github.com/romannurik/3982005

Solution 2

This is the QuickAction UI pattern. Take a look at:

  1. GreenDroid, a collection of Android widgets - namely the QuickAction... widgets such as QuickActionBar, QuickActionGrid etc
  2. How to create a QuickAction dialog in Android

Solution 3

another alternative would be "super-tooltips":

https://github.com/nhaarman/supertooltips

here's a demo of it:

https://play.google.com/store/apps/details?id=com.haarman.supertooltips

Solution 4

There are several libraries available that will assist you in implementing tooltips in Android.

I recommend the Android Tooltip library which you can find on Github

Example usage:

Tooltip.make(this,
    new Builder(101)
    .anchor(aView, Gravity.BOTTOM)
    .closePolicy(new ClosePolicy()
        .insidePolicy(true, false)
        .outsidePolicy(true, false), 3000)
    .activateDelay(800)
    .showDelay(300)
    .text(R.string.hello_world)
    .maxWidth(500)
    .withArrow(true)
    .withOverlay(true)
    floatingAnimation(AnimationBuilder.DEFAULT)
    .build()
).show();
Share:
32,387
Joe Simpson
Author by

Joe Simpson

Pushing buttons and making things work

Updated on January 03, 2020

Comments

  • Joe Simpson
    Joe Simpson over 4 years

    I would like to create a tooltip like thing in Android to help show my users what something is, as people have told me they don't know what it is. For an idea of what i'm after here is a drawing:

    Diagram