Java 类com.facebook.widget.FriendPickerFragment 实例源码

项目:CodePix-Android    文件:HelloFacebookSampleActivity.java   
private void onFriendPickerDone(FriendPickerFragment fragment) {
    FragmentManager fm = getSupportFragmentManager();
    fm.popBackStack();

    String results = "";

    List<GraphUser> selection = fragment.getSelection();
    tags = selection;
    if (selection != null && selection.size() > 0) {
        ArrayList<String> names = new ArrayList<String>();
        for (GraphUser user : selection) {
            names.add(user.getName());
        }
        results = TextUtils.join(", ", names);
    } else {
        results = getString(R.string.no_friends_selected);
    }

    showAlert(getString(R.string.you_picked), results);
}
项目:CallService-Facebook-sample    文件:PickFriendsActivity.java   
public static void populateParameters(Intent intent, String userId,
        boolean multiSelect, boolean showTitleBar) {
    intent.putExtra(FriendPickerFragment.USER_ID_BUNDLE_KEY, userId);
    intent.putExtra(FriendPickerFragment.MULTI_SELECT_BUNDLE_KEY,
            multiSelect);
    intent.putExtra(FriendPickerFragment.SHOW_TITLE_BAR_BUNDLE_KEY,
            showTitleBar);
}
项目:CodePix-Android    文件:HelloFacebookSampleActivity.java   
private void setFriendPickerListeners(final FriendPickerFragment fragment) {
    fragment.setOnDoneButtonClickedListener(new FriendPickerFragment.OnDoneButtonClickedListener() {
        @Override
        public void onDoneButtonClicked(PickerFragment<?> pickerFragment) {
            onFriendPickerDone(fragment);
        }
    });
}
项目:facebook-android-sdk    文件:PickFriendsActivity.java   
public static void populateParameters(Intent intent, String userId, boolean multiSelect, boolean showTitleBar) {
    intent.putExtra(FriendPickerFragment.USER_ID_BUNDLE_KEY, userId);
    intent.putExtra(FriendPickerFragment.MULTI_SELECT_BUNDLE_KEY, multiSelect);
    intent.putExtra(FriendPickerFragment.SHOW_TITLE_BAR_BUNDLE_KEY, showTitleBar);
}
项目:FacebookNewsfeedSample-Android    文件:PickFriendsActivity.java   
public static void populateParameters(Intent intent, String userId, boolean multiSelect, boolean showTitleBar) {
    intent.putExtra(FriendPickerFragment.USER_ID_BUNDLE_KEY, userId);
    intent.putExtra(FriendPickerFragment.MULTI_SELECT_BUNDLE_KEY, multiSelect);
    intent.putExtra(FriendPickerFragment.SHOW_TITLE_BAR_BUNDLE_KEY, showTitleBar);
}
项目:CodePix-Android    文件:HelloFacebookSampleActivity.java   
private void onClickPickFriends() {
    final FriendPickerFragment fragment = new FriendPickerFragment();

    setFriendPickerListeners(fragment);

    showPickerFragment(fragment);
}