android-simple-tooltip
android-simple-tooltip copied to clipboard
Add shadow to tooltip
Hi, How can i show the tooltip with shadow? Because tooltip with same color as background is not visible.
Here's my scenario: My tooltip is of white color, and background of activity is dynamic, so sometimes background is white color, at this time the tooltip is not visible without any border or shadow.
Take a look at the Custom Layout Sample:
Code:
https://github.com/douglasjunior/android-simple-tooltip/blob/cd70d91507cb64749c73f99e3254836190a6c568/sample/src/main/java/io/github/douglasjunior/androidSimpleTooltip/sample/MainActivity.java#L166-L178
Layout:
https://github.com/douglasjunior/android-simple-tooltip/blob/cd70d91507cb64749c73f99e3254836190a6c568/sample/src/main/res/layout/tooltip_custom.xml#L2-L7
Background:
https://github.com/douglasjunior/android-simple-tooltip/blob/cd70d91507cb64749c73f99e3254836190a6c568/sample/src/main/res/drawable/bg_tooltip.xml#L1-L5
And then, try something like this: https://stackoverflow.com/a/15333015/2826279
the shadow even is added to the arrow? otherwise , a shadow will be added at the top to the arrow since the arrow does not belong to the layout (tooltip_custom.xml)