[英]Facebook ProfilePictureView display Circular image
我正在使用新的Facebook SDK 4.0,我想在我的應用程序中顯示用戶個人資料圖片。 為此,我使用facebook提供的ProfilePictureView。
在我的xml我使用下面的代碼 -
<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" />
和我的活動中的代碼是 -
ProfilePictureView profilePicture = (ProfilePictureView) view.findViewById(R.id.profilePicture);
profilePicture.setProfileId(userID);
我沒有得到任何方式如何以循環方式顯示圖像。
提前致謝。
如果要以循環方式顯示圖像,則可以在項目中使用Picasso庫,您可以在其中傳遞需要顯示的顯示圖像的URL,該URL可以從Facebook圖形API中檢索。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.