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
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
精彩评论