Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Display a tooltip for few seconds on click event in android

I want to display some information using tool-tip for few seconds on click event of a view in android.

like image 773
Amit Avatar asked Apr 24 '17 11:04

Amit


People also ask

What is a tooltip hover?

A tooltip, also known as screentips or hover help, is an overlay or callout that appears in certain parts of the user workflow on a digital product, containing helpful hints about less intuitive features.

How do I show tooltip?

Basic Tooltip HTML: Use a container element (like <div>) and add the "tooltip" class to it. When the user mouse over this <div>, it will show the tooltip text. The tooltip text is placed inside an inline element (like <span>) with class="tooltiptext" .

What is tooltip pop up?

A tooltip is pop-up text that is displayed when a user positions the cursor over a control in MicroStrategy Web. You can use tooltips to provide extra information, such as the full company name in the tooltip of the company logo.


1 Answers

you can do this by setting click listener to your view and inside onclicklistener, perform long click as in the code below

//Set Tooltip
TooltipCompat.setTooltipText(myTextView,"my tooltip")
//
myTextView.setOnClickListener{
    myTextView.performLongClick()
}
like image 127
Abdurrahman Oğuzhan Durmaz Avatar answered Sep 29 '22 02:09

Abdurrahman Oğuzhan Durmaz