Поэтому я использую библиотеку lopspower / CircularImageView для создания кругового изображения, например,
<com.mikhaellopez.circularimageview.CircularImageView
android:id="@+id/nav_header_profile_pic"
android:layout_width="100dp"
android:layout_height="100dp"
android:gravity="center"
android:src="@drawable/square_shape"
android:foreground="@drawable/foreground_add_image"
app:civ_border_color="@color/colorPrimaryDark"
app:civ_border_width="2dp"
app:civ_shadow="true"
app:civ_shadow_radius="2"
app:civ_shadow_color="@color/dark_grey"/>
, и у меня есть такие ресурсы для рисования, как этот
square_shape.xml
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<solid android:color="@color/colorPrimaryLight"/>
</shape>
</item>
</layer-list>
и
foreground_add_image.xml
<?xml version="1.0" encoding="utf-8"?>
<inset
xmlns:android="http://schemas.android.com/apk/res/android"
android:inset="30dp"
android:drawable="@drawable/ic_add_a_photo_white_24dp" />
изображение на переднем плане отображается, но Android: src = "@ drawable / square_shape" не отображается.