4

I am using new Facebook SDK 4.0 and i want to display User Profile picture in my app. For this i am using ProfilePictureView provided by facebook.

In my xml i am using 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 code inside my activity is -

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

I did not get any way how to displplay image in Circular way.

Thanks in advance.

Ravi Bhandari
  • 4,682
  • 8
  • 40
  • 68

2 Answers2

2

I am sure you need to modify ProfilePictureView class.

Please check below SO LINK .I hope it will helps you .

  1. Display FB profile pic in circular image view in Application
Community
  • 1
  • 1
IntelliJ Amiya
  • 74,896
  • 15
  • 165
  • 198
1

If you want to display the image in a circular way, then you can use Picasso library in your project where you can pass the URL of the display image that you need to show which can be retrieved from Facebook graph API.

Jarvis
  • 503
  • 2
  • 5
  • 17