Making an image circular with white circular border

后端 未结 10 2463
甜味超标
甜味超标 2021-02-19 19:32

How to make an image circular and give it white circular border? Is it necessary to use two image views – one for the image and other for the white border? Is there any other wa

10条回答
  •  攒了一身酷
    2021-02-19 20:16

    First get Circulat image with your code. Then apply this xml :

     
    
        
    
    

    Then add a relative layout and add an imageview to it.Arrange it to the center of relative layout.And set this circle shape as Imageview's background.Then place your circular imageview above previously added imageview.Arrange it also to center.By changing your circular imageview margin you will get the desired border effect. Hope this will help you..

提交回复
热议问题