Search code examples
androidandroid-imageview

How to set Circular Image View Background black in android?


Image View background reflect only inside the circle not outside the circle. I tried so many things but not able do that. Anybody please me. Thanks!!


Solution

  • Make an .xml file in drawable folder with this content:

    <?xml version="1.0" encoding="utf-8"?>
    <shape
         xmlns:android="http://schemas.android.com/apk/res/android"
         android:shape="oval">
         <solid
            android:color="@color/black"/>
    </shape>
    

    Then set this file as your background.