标记选择的用户为选中的FriendPicker(Facebook的SDK为Android) [英] Mark selected user as checked in FriendPicker (Facebook SDK for Android)
本文介绍了标记选择的用户为选中的FriendPicker(Facebook的SDK为Android)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的的Facebook SDK为Android 完成的教程一>(尤其是显示好友的-tutorial )。
我如何庆祝,我之前已经选择在PickerActivity当我点击显示友 - 按钮了吗?
How can I mark the selected users which i've selected before at the PickerActivity when i click on the "Show Friends"-button again?
推荐答案
您必须通过逗号分隔字符串选定的Facebook用户ID的捆绑到FriendPickerFragment。
You have to pass comma separated string with selected facebook user ids in the bundle to the FriendPickerFragment.
Bundle args = new Bundle();
args.putString("com.facebook.android.PickerFragment.Selection", "11111, 2222, 333, already selected facebook ids....");
friendPickerFragment = new FriendPickerFragment(args);
在列表中选择
在PickerFragment的onActivityCreated(),它会分析所选择的IDS节目。你可以看到在FacebookSDK以下code在PickerFragment。
In PickerFragment's onActivityCreated() it will parse the selected ids shows as selected in list. You can see the following code in PickerFragment in FacebookSDK.
selectionStrategy.readSelectionFromBundle(savedInstanceState, SELECTION_BUNDLE_KEY);
这篇关于标记选择的用户为选中的FriendPicker(Facebook的SDK为Android)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文