Creating horizontal and vertical dotted lines in android

前端 未结 9 2194
臣服心动
臣服心动 2021-01-30 17:14

I want to draw horizontal and vertical dotted lines in android using shapes.

I want to draw like this

\"ent

9条回答
  •  你的背包
    2021-01-30 17:40

    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:

    
        
            
        
    
    

提交回复
热议问题