开发者

How to set Tool tip on a Button in android?

开发者 https://www.devze.com 2023-03-17 16:52 出处:网络
i want to set tool tip on a button means when you place fingeron any button it shows some text on button , i know method开发者_Go百科 in java awt but that not for java

i want to set tool tip on a button means when you place finger on any button it shows some text on button , i know method开发者_Go百科 in java awt but that not for java in java we can use

uiObj.setToolTiptext("text");

but in android i am not getting any code please s any help for setting tool tip on a button

How to set Tool tip on a Button in android?


Android doesn't have tool tips. It is a touch-based UI. Current touch sensors can't generally detect hovering in a way that tool tips would be useful.


Ok I can give you an idea you can handle the first click on the item by showing your tooltip then in the second time you dismiss the tooltip and perform what your button does for real.

In Android you can show something like the tooltip using some quick action dialog. You can see this example: http://www.londatiga.net/it/how-to-create-quickaction-dialog-in-android/


Here is the library, which I have created for myself for similar purposes. As usual, we want to show some descriptions for UI elements only after the first app opening.

P.S.: For future users: feel free to create feature requests, issues and any other feedback - I will enjoy it and try to help you!

https://github.com/mpetlyuk/initial_tips

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号