Vertical line using XML drawable

前端 未结 15 792
无人及你
无人及你 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:28

    You can use a shape but instead of a line make it rectangle.

    android:shape="rectangle">
    
    

    and In your layout use this...

    
    

    You might have to play with the width, depending on the size of the dashes, to get it into a single line.

    Hope this helps Cheers

提交回复
热议问题