I want to display some information using tool-tip for few seconds on click event of a view in android.
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.
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" .
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.
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()
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With