How to make layout with rounded corners..?

后端 未结 18 2916
独厮守ぢ
独厮守ぢ 2020-11-22 09:37

How can I make a layout with rounded corners? I want to apply rounded corners to my LinearLayout.

18条回答
  •  囚心锁ツ
    2020-11-22 10:20

    Here's a copy of a XML file to create a drawable with a white background, black border and rounded corners:

      
         
                
    
            
    
             
    
             
        
    

    save it as a xml file in the drawable directory, Use it like you would use any drawable background(icon or resource file) using its resource name (R.drawable.your_xml_name)

提交回复
热议问题