I’m currently working on map overlay which highlights the route along specified points and I need to implement certain line style (something like on screenshot)

What I’m trying to do – is to highlight the route with something like transparent line with black stroke lines from both sides
Playing with different fill styles and Paint settings haven’t led me to any solution so far.
Does anybody know what direction I need to look for?
Currently I managed to draw only solid line, but this is not what I’m looking for:
Paint setup:
mPaint.setStyle(Paint.Style.STROKE);
mPaint.setColor(COLOR_DEFAULT);
mPaint.setPathEffect(new CornerPathEffect(10));
mPaint.setStrokeWidth(6);
mPaint.setAntiAlias(true);
Drawing routine
canvas.drawPath(mPath, mPaint);
I get pretty good results with PathDashPathEffect using a “dash stamp” that’s two very thin rectangles and the MORPH style option. See last and 3rd last line here:
This was drawn by modifying the
PathEffectsexample in ApiDemos taken from the SDK: