public class FriendPickerFragment extends PickerFragment<GraphUser>
Modifier and Type | Class and Description |
---|---|
static class |
FriendPickerFragment.FriendPickerType |
PickerFragment.GraphObjectFilter<T>, PickerFragment.OnDataChangedListener, PickerFragment.OnDoneButtonClickedListener, PickerFragment.OnErrorListener, PickerFragment.OnSelectionChangedListener
Fragment.InstantiationException, Fragment.SavedState
Modifier and Type | Field and Description |
---|---|
static String |
FRIEND_PICKER_TYPE_KEY
The key for a String parameter in the fragment's Intent bundle to indicate the type of friend picker to use.
|
static String |
MULTI_SELECT_BUNDLE_KEY
The key for a boolean parameter in the fragment's Intent bundle to indicate whether the
picker should allow more than one friend to be selected or not.
|
static String |
USER_ID_BUNDLE_KEY
The key for a String parameter in the fragment's Intent bundle to indicate what user's
friends should be shown.
|
DONE_BUTTON_TEXT_BUNDLE_KEY, EXTRA_FIELDS_BUNDLE_KEY, SHOW_PICTURES_BUNDLE_KEY, SHOW_TITLE_BAR_BUNDLE_KEY, TITLE_TEXT_BUNDLE_KEY
Constructor and Description |
---|
FriendPickerFragment()
Default constructor.
|
FriendPickerFragment(Bundle args)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
getMultiSelect()
Gets whether the user can select multiple friends, or only one friend.
|
List<GraphUser> |
getSelection()
Gets the currently-selected list of users.
|
String |
getUserId()
Gets the ID of the user whose friends should be displayed.
|
void |
loadData(boolean forceReload)
Causes the picker to load data from the service and display it to the user.
|
void |
onInflate(Activity activity,
AttributeSet attrs,
Bundle savedInstanceState) |
void |
setFriendPickerType(FriendPickerFragment.FriendPickerType type)
Sets the friend picker type for this fragment.
|
void |
setMultiSelect(boolean multiSelect)
Sets whether the user can select multiple friends, or only one friend.
|
void |
setSelection(GraphUser... graphUsers)
Sets the list of friends for pre selection.
|
void |
setSelection(List<GraphUser> graphUsers)
Sets the list of friends for pre selection.
|
void |
setSelectionByIds(List<String> userIds)
Sets the list of friends for pre selection.
|
void |
setSelectionByIds(String... userIds)
Sets the list of friends for pre selection.
|
void |
setSettingsFromBundle(Bundle inState)
Updates the properties of the PickerFragment based on the contents of the supplied Bundle;
calling Activities may use this to pass additional configuration information to the
PickerFragment beyond what is specified in its XML layout.
|
void |
setUserId(String userId)
Sets the ID of the user whose friends should be displayed.
|
getDoneButtonText, getExtraFields, getFilter, getOnDataChangedListener, getOnDoneButtonClickedListener, getOnErrorListener, getOnSelectionChangedListener, getSession, getShowPictures, getShowTitleBar, getTitleText, loadData, onActivityCreated, onCreate, onCreateView, onDetach, onSaveInstanceState, onStop, setArguments, setDoneButtonText, setExtraFields, setFilter, setOnDataChangedListener, setOnDoneButtonClickedListener, setOnErrorListener, setOnSelectionChangedListener, setSession, setShowPictures, setShowTitleBar, setTitleText
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getEnterTransition, getExitTransition, getFragmentManager, getId, getLayoutInflater, getLoaderManager, getParentFragment, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, hashCode, hasOptionsMenu, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isMenuVisible, isRemoving, isResumed, isVisible, onActivityResult, onAttach, onConfigurationChanged, onContextItemSelected, onCreateAnimation, onCreateContextMenu, onCreateOptionsMenu, onDestroy, onDestroyOptionsMenu, onDestroyView, onHiddenChanged, onLowMemory, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPrepareOptionsMenu, onResume, onStart, onViewCreated, onViewStateRestored, registerForContextMenu, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, startActivity, startActivityForResult, toString, unregisterForContextMenu
public static final String USER_ID_BUNDLE_KEY
public static final String MULTI_SELECT_BUNDLE_KEY
public static final String FRIEND_PICKER_TYPE_KEY
public FriendPickerFragment()
public FriendPickerFragment(Bundle args)
args
- a Bundle that optionally contains one or more values containing additional
configuration information for the Fragment.public String getUserId()
public void setUserId(String userId)
userId
- the user ID, or nullpublic boolean getMultiSelect()
public void setMultiSelect(boolean multiSelect)
multiSelect
- true if the user can select multiple friends, false if only one friendpublic void setFriendPickerType(FriendPickerFragment.FriendPickerType type)
type
- the type of friend picker to use.public void setSelectionByIds(List<String> userIds)
userIds
- list of friends as idspublic void setSelectionByIds(String... userIds)
userIds
- list of friends as idspublic void setSelection(GraphUser... graphUsers)
graphUsers
- list of friends as GraphUserspublic void setSelection(List<GraphUser> graphUsers)
graphUsers
- list of friends as GraphUserspublic List<GraphUser> getSelection()
public void onInflate(Activity activity, AttributeSet attrs, Bundle savedInstanceState)
onInflate
in class PickerFragment<GraphUser>
public void setSettingsFromBundle(Bundle inState)
PickerFragment
setSettingsFromBundle
in class PickerFragment<GraphUser>
inState
- a Bundle containing keys corresponding to properties of the PickerFragmentpublic void loadData(boolean forceReload)
PickerFragment
loadData
in class PickerFragment<GraphUser>
forceReload
- if true, data will be loaded even if there is already data being displayed (or loading);
if false, data will not be re-loaded if it is already displayed (or loading)