when I try to use : android.support.v4.widget.CircleImageView
If you want to do it in a native style just use this snippet
<android.support.v7.widget.CardView
android:id="@+id/view2"
android:layout_width="45dp"
android:layout_height="45dp"
android:background="#ffffff"
android:shape="ring"
app:cardCornerRadius="23dp">
<ImageView
android:id="@+id/profile_img_post"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:scaleType="centerCrop"
android:src="@drawable/test_img"></ImageView>
</android.support.v7.widget.CardView>
dependency:
compile 'de.hdodenhof:circleimageview:2.0.0'
code:
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/iv_circle"
android:layout_width="96dp"
android:layout_height="96dp"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:src="@drawable/thumb"
app:border_color="@color/white"
app:border_width="2dp" />