Vertical line using XML drawable

前端 未结 15 798
无人及你
无人及你 2020-11-27 09:57

I\'m trying to figure out how to define a vertical line (1dp thick) to be used as a drawable.

To make a horizontal one, it\'s pretty straightforward:



        
15条回答
  •  生来不讨喜
    2020-11-27 10:10

    To make a vertical line, just use a rectangle with width of 1dp:

    
        
        
    
    

    Don't use stroke, use solid (which is the "fill" color) to specify the color of the line.

提交回复
热议问题