Drawing dotted (…)trail path instead of a line (________)

前端 未结 1 1082
挽巷
挽巷 2021-01-13 03:49

Now below is my code that draws path between geopoints in map. This works perfectly fine. What I\'m trying to implement is instead of drawing a line,display this path with

相关标签:
1条回答
  • 2021-01-13 04:43

    Thanks to this guy, I referred this example and it is working for me.

    How do I make a dotted/dashed line in Android?

    Just need to add these 2 lines,

        paint.setPathEffect(new DashPathEffect(new float[] {10,10}, 5));
        canvas.drawLine(point.x, point.y, point2.x, point2.y, paint);
    

    after I set,

        paint.setAlpha(120); 
    

    @Frankenstein, thank you

    0 讨论(0)
提交回复
热议问题