Android: How can I achieve/draw an arrow and put a text on top of it using Canvas/Paint?
I want to achieve the below picture (i made it via excel).
Here are the requirements:
- arrow down shape
- "GOAL" text on top of it
- tip of the arrow should be pointed on the given x,y
- transparent effect (i think its setAlpha(0..255))
- gradient e开发者_开发问答ffect (top to bottom)
- emboss effect (optional)
- lighting effect (optional)
Any guidance is appreciated. *i don't have idea on how to draw. please guide us via code snippets example.
UPDATES I just need small icon.
you have to go for nine patch image. set backgrond of textview is "nineparch image". and setyour text view at x,y using absolute layout.
Nine patch is available here:
http://developer.android.com/guide/developing/tools/draw9patch.html
it may help you.
精彩评论