public class PlacePickerFragment extends PickerFragment<GraphPlace>
PickerFragment.GraphObjectFilter<T>, PickerFragment.OnDataChangedListener, PickerFragment.OnDoneButtonClickedListener, PickerFragment.OnErrorListener, PickerFragment.OnSelectionChangedListenerandroid.support.v4.app.Fragment.InstantiationException, android.support.v4.app.Fragment.SavedStateIAddonAttacher.AddonCallback<V>, IAddonAttacher.AttachException| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_RADIUS_IN_METERS
The default radius around the center point to search.
|
static int |
DEFAULT_RESULTS_LIMIT
The default number of results to retrieve.
|
static String |
LOCATION_BUNDLE_KEY
The key for a Location parameter in the fragment's Intent bundle to indicate what geographical
location should be the center of the search.
|
static String |
RADIUS_IN_METERS_BUNDLE_KEY
The key for an int parameter in the fragment's Intent bundle to indicate the radius in meters around
the center point to search.
|
static String |
RESULTS_LIMIT_BUNDLE_KEY
The key for an int parameter in the fragment's Intent bundle to indicate what how many results to
return at a time.
|
static String |
SEARCH_TEXT_BUNDLE_KEY
The key for a String parameter in the fragment's Intent bundle to indicate what search text should
be sent to the service.
|
static String |
SHOW_SEARCH_BOX_BUNDLE_KEY
The key for a boolean parameter in the fragment's Intent bundle to indicate that the fragment
should display a search box and automatically update the search text as it changes.
|
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 |
|---|
PlacePickerFragment()
Default constructor.
|
PlacePickerFragment(android.os.Bundle args)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
android.location.Location |
getLocation()
Gets the location to search around.
|
int |
getRadiusInMeters()
Gets the radius in meters around the location to search.
|
int |
getResultsLimit()
Gets the number of results to retrieve.
|
String |
getSearchText()
Gets the search text (e.g., category, name) to search for.
|
GraphPlace |
getSelection()
Gets the currently-selected place.
|
void |
onActivityCreated(android.os.Bundle savedInstanceState) |
void |
onAttach(Activity activity) |
void |
onDetach() |
void |
onInflate(Activity activity,
android.util.AttributeSet attrs,
android.os.Bundle savedInstanceState) |
void |
onSearchBoxTextChanged(String searchText,
boolean forceReloadEventIfSameText)
Sets the search text and reloads the data in the control.
|
void |
setLocation(android.location.Location location)
Sets the location to search around.
|
void |
setRadiusInMeters(int radiusInMeters)
Sets the radius in meters around the location to search.
|
void |
setResultsLimit(int resultsLimit)
Sets the number of results to retrieve.
|
void |
setSearchText(String searchText)
Sets the search text (e.g., category, name) to search for.
|
void |
setSettingsFromBundle(android.os.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.
|
getDoneButtonText, getExtraFields, getFilter, getOnDataChangedListener, getOnDoneButtonClickedListener, getOnErrorListener, getOnSelectionChangedListener, getSession, getShowPictures, getShowTitleBar, getTitleText, loadData, onCreate, onCreateView, onSaveInstanceState, setArguments, setDoneButtonText, setExtraFields, setFilter, setOnDataChangedListener, setOnDoneButtonClickedListener, setOnErrorListener, setOnSelectionChangedListener, setSession, setShowPictures, setShowTitleBar, setTitleTextaddon, addon, addon, getLayoutInflater, instantiate, instantiate, instantiate, instantiate, isAddonAttached, lockAttaching, obtainAddonsList, onViewCreated, performAddonAction, startActionModegetContainerId, getContextMenuListener, getDefaultSharedPreferences, getDefaultSharedPreferences, getLayoutInflater, getMenuInflater, getSharedPreferences, getSharedPreferences, getSupportActionBar, getSupportActionBarContext, getSupportActivity, getSupportApplication, getSystemService, isDetachChildFragments, onAttach, onContextItemSelected, onContextItemSelected, onContextMenuClosed, onCreateContextMenu, onCreateContextMenu, onCreateOptionsMenu, onCreateOptionsMenu, onCreateView, onDestroyView, onInflate, onOptionsItemSelected, onOptionsItemSelected, onPrepareOptionsMenu, onPrepareOptionsMenu, onViewCreated, openContextMenu, registerForContextMenu, setDetachChildFragments, setInitialSavedState, setUserVisibleHint, unregisterForContextMenudump, equals, getActivity, getArguments, getChildFragmentManager, getFragmentManager, getId, getLoaderManager, getParentFragment, getResources, getRetainInstance, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, hashCode, isAdded, isDetached, isHidden, isInLayout, isRemoving, isResumed, isVisible, onActivityResult, onConfigurationChanged, onCreateAnimation, onDestroy, onDestroyOptionsMenu, onHiddenChanged, onLowMemory, onOptionsMenuClosed, onPause, onResume, onStart, onStop, onViewStateRestored, setHasOptionsMenu, setMenuVisibility, setRetainInstance, setTargetFragment, startActivity, startActivityForResult, toStringpublic static final String RADIUS_IN_METERS_BUNDLE_KEY
public static final String RESULTS_LIMIT_BUNDLE_KEY
public static final String SEARCH_TEXT_BUNDLE_KEY
public static final String LOCATION_BUNDLE_KEY
public static final String SHOW_SEARCH_BOX_BUNDLE_KEY
public static final int DEFAULT_RADIUS_IN_METERS
public static final int DEFAULT_RESULTS_LIMIT
public PlacePickerFragment()
public PlacePickerFragment(android.os.Bundle args)
args - a Bundle that optionally contains one or more values containing additional
configuration information for the Fragment.public android.location.Location getLocation()
public void setLocation(android.location.Location location)
location - the Location to search aroundpublic int getRadiusInMeters()
public void setRadiusInMeters(int radiusInMeters)
radiusInMeters - the radius in meterspublic int getResultsLimit()
public void setResultsLimit(int resultsLimit)
resultsLimit - the number of results to retrievepublic String getSearchText()
public void setSearchText(String searchText)
searchText - the search textpublic void onSearchBoxTextChanged(String searchText, boolean forceReloadEventIfSameText)
searchText - the search textforceReloadEventIfSameText - if true, will reload even if the search text has not changed; if false,
identical search text will not force a reloadpublic GraphPlace getSelection()
public void setSettingsFromBundle(android.os.Bundle inState)
PickerFragmentsetSettingsFromBundle in class PickerFragment<GraphPlace>inState - a Bundle containing keys corresponding to properties of the PickerFragmentpublic void onInflate(Activity activity, android.util.AttributeSet attrs, android.os.Bundle savedInstanceState)
onInflate in class PickerFragment<GraphPlace>public void onActivityCreated(android.os.Bundle savedInstanceState)
onActivityCreated in class PickerFragment<GraphPlace>public void onDetach()
onDetach in class PickerFragment<GraphPlace>Copyright © 2013. All Rights Reserved.