also, these two libraries can help you.
https://github.com/vinc3m1/RoundedImageView
implement below code:
implementation 'com.makeramen:roundedimageview:2.3.0'
Simple Usage:
<com.makeramen.roundedimageview.RoundedImageView
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/imageView1"
android:src="@drawable/photo1"
android:scaleType="fitCenter"
app:riv_corner_radius="30dip"
app:riv_border_width="2dip"
app:riv_border_color="#333333"
app:riv_mutate_background="true"
app:riv_tile_mode="repeat"
app:riv_oval="true" />
https://github.com/chirag-kachhadiya/RoundedImageView
Simple Usage:
implement below code:
implementation 'com.github.chirag-kachhadiya:RoundedImageView:1.0'
<com.infinityandroid.roundedimageview.RoundedImageView
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:adjustViewBounds="true"
android:src="@drawable/the_hundred"
app:corner_radius="10" />