How to Apply Corner Radius to LinearLayout

前端 未结 4 1882
傲寒
傲寒 2020-11-29 16:37

I want to make a layout with a rounded border. How can I apply a radius of a particular size in a LinearLayout?

4条回答
  •  星月不相逢
    2020-11-29 17:24

    You can create an XML file in the drawable folder. Call it, for example, shape.xml

    In shape.xml:

    
    
        
        
    
        
        
    
        
        
    
        
        
    
    
    

    The tag is for your specific question.

    Make changes as required.

    And in your whatever_layout_name.xml:

    
    
    

    This is what I usually do in my apps. Hope this helps....

提交回复
热议问题