Facebook Profile PictureView Display Circle Image

I am using the new Facebook SDK 4.0 and I want to show the user profile image in my application. For this I use ProfilePictureView provided by facebook.

In my xml, I use below code -

<com.facebook.widget.ProfilePictureView
    android:id="@+id/user_profile_pic"
    android:layout_height="wrap_content"
    android:layout_width="wrap_content"
    android:layout_gravity="center"
    android:gravity="center_horizontal"
    facebook:preset_size="small" />

and the code inside my activity is

 ProfilePictureView profilePicture = (ProfilePictureView) view.findViewById(R.id.profilePicture);
 profilePicture.setProfileId(userID);

I did not manage how to move the image in a circle.

Thanks in advance.

+4
source share
2 answers

I'm sure you need to change the class ProfilePictureView.

Please check below SO LINK . I hope this helps you.

+2
source

, Picasso , URL- , , API- Facebook.

+1

Source: https://habr.com/ru/post/1612020/


All Articles