I am developing an app , in which i want to make diff shapes like arrow,rectangles, lines, free draw etc dynamically on finger touch, i am able to draw line, free draw, rectangles but i am not getting the arrow.i also search a lot on google but didn't find anythng relevant.Please suggest if someone has a solution.
Asked
Active
Viewed 1,120 times
2
-
1Your best bet would probably be a 9 drawable arrow that is expanded as they draw... you'd just have to set the angle as their finger moved... – RyanInBinary Sep 14 '12 at 13:35
-
1@RyanInBinary That's not a bad idea. You might lose some quality if you rotate though.. – Samuel Sep 14 '12 at 13:40
-
That's a good point Samuel, I hadn't considered that. – RyanInBinary Sep 14 '12 at 13:42
-
Che this : [drawing arrowhead](http://stackoverflow.com/questions/6713757/how-do-i-draw-an-arrowhead-in-android) – Imran Rana Sep 14 '12 at 13:53
-
@ Imran Rana: This is just making an arrow head – neha neema Sep 14 '12 at 17:07
1 Answers
2
-
@nehaneema Imran Rana already commented with a great link that tells you how to use a Path. You can apply the same logic to draw the rest of the arrow. – Samuel Sep 14 '12 at 17:11
-
I used the following code it makes the arrow in correct form only when i make from top to bottom, or functionally i can say only when mX > mY.i dont understand how to tackle it.. – neha neema Sep 15 '12 at 07:36