I am using glide library to load the image.
I am not able to get the border of the image. How will I set the image border.
Glide.with(getApplicationContext()).load(image_path).asBitmap().centerCrop().into(new BitmapImageViewTarget(profile_pic) {
@Override
protected void setResource(Bitmap resource) {
RoundedBitmapDrawable circularBitmapDrawable =
RoundedBitmapDrawableFactory.create(MainActivity.this.getResources(), resource);
circularBitmapDrawable.setCircular(true);
profile_pic.setImageDrawable(circularBitmapDrawable);
}
});
<ImageView
android:id="@+id/profile_pic"
android:layout_width="120dp"
android:layout_height="120dp"
android:layout_gravity="center_horizontal"
android:src="@drawable/quila"
app:layout_behavior="profile.AvatarImageBehavior"
app:finalHeight="32dp"
app:finalYPosition="2dp"
app:startHeight="2dp"
app:startToolbarPosition="2dp"
app:startXPosition="2dp"/>
I have searched through net and found this article but i don't want to add another library. Can anyone help me with this?