ImageView in circular through xml

前端 未结 27 1460
死守一世寂寞
死守一世寂寞 2020-11-22 10:35

I\'d Like to make any image from my ImageView to be circular with a border.

I searched but couldn\'t find any useful information (anything that I tried

27条回答
  •  我在风中等你
    2020-11-22 10:52

    @Jyotman Singh, answer is very good (for solid backgrounds), so I would like to enhance it by sharing vector drawable that can be re-colored for your needs, also it is convenient since vector one-piece shape is well scalable.

    This is the rectangle-circle shape (@drawable/shape_round_profile_pic):

    
    
         // you can change frame color
    
    

    Usage is the same:

    
    
            
    
            
    
        
    

提交回复
热议问题