I want to make the ImageView round, without a picture it turns out, but if you specify the android:src attribute, then the ImageView immediately becomes square. How to fix it?
ImageView markup:
<ImageView android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/profile_photo" android:src="@drawable/no_photo" android:id="@+id/profile_photo" /> Markup @drawable/profile_photo :
<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <solid android:color="@color/white"/> <corners android:radius="150dip" /> </shape>