Making an image circular with white circular border

后端 未结 10 2446
甜味超标
甜味超标 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:23

    No it is not necessary that you have to use two image views one for the image and other for the white border. You can create one new XML file like below

    border.xml

    
    
    
    
    
    
    

    and then set it to your image-view. Like add below line to your image-view.

    android:background="@drawable/border"
    

提交回复
热议问题