Android template custom element

I used the stroke pattern in Google Maps, but was disappointed that there is no new Arrow() option. It seems that only Dot , Gap and Dash PatternItems exist. So my question is: is it possible to create custom PatternItems like the arrow mentioned above? So instead of the points below, I would have an arrow for each point.

map with stroke pattern

+7
source share
1 answer

I achieved this, but using pathDashPathEffect. redefined ondrawMap or something similar in the map view. if you have a map fragment, you can easily add a view to the map. you have forecasts to get the start and end points for the line. look for pathEffect in the android drawing class.

0
source

Source: https://habr.com/ru/post/1273664/


All Articles