Draw custom line between two elements in TableLayout Android

前端 未结 2 1777
一整个雨季
一整个雨季 2021-02-01 11:42

I have an activity with events organised in a timeline. But it looks ugly.

\"enter

<
2条回答
  •  无人及你
    2021-02-01 11:50

    If you just want a line displayed i recommend you to create a Drawable for this. Heres a little example: Layout file

    
    
    
    
    

    and the line.xml Drawable

    
    
        
            
                
            
    
        
        
            
                
            
        
    
    
    

    The Layer-list may also be changed to use up additional Drawables as the ones you are already using.

    An example using draw-9 might look like this: line.xml

    
    
        
            
        
    
        
    
    
    

    Layout:

    
    
    
        
    
        
    
        
    
    

    and my point.9.png draw-9 point.9.png

    to apply a draw-nine-patch you must mark the parts to be streched with black color on the borders.

提交回复
热议问题