I want to draw horizontal and vertical dotted lines in android using shapes.
I want to draw like this
If the View has 1dp width then just rotating your horizontal line is not enough. The vertical line’s length will be 1dp as it is drawn horizontally first, then rotated. Here is a trick to solve this problem: