Reputation: 21
I'm new in android and I want to create a circular image view with border and shadow. I searched on internet and I got couple of codes, but some of them are xml layout code and others in java. So can you please tell me which one is better to use? Thanks!
Upvotes: 1
Views: 908
Reputation: 21
In your build.gradle File:
dependencies {
...
compile 'de.hdodenhof:circleimageview:2.1.0'
}
In XML:
<de.hdodenhof.circleimageview.CircleImageView
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/profile_image"
android:layout_width="96dp"
android:layout_height="96dp"
android:src="@drawable/profile"
app:civ_border_width="2dp"
app:civ_border_color="#FF000000"/>
Limitations:
Upvotes: 2