Расширение: | PickerFragment |
Пакет: | widget |
PlacePickerFragment()
Default constructor. Creates a Fragment with all default properties.
public PlacePickerFragment()
PlacePickerFragment(Bundle)
Constructor.
public PlacePickerFragment(Bundle args)
Параметр | Описание |
---|---|
args | A Bundle that optionally contains one or more values containing additional configuration information for the Fragment. |
getLocation()
Gets the location to search around. Either the location or the search text (or both) must be specified.
public Location getLocation()
setLocation(Location)
Sets the location to search around. Either the location or the search text (or both) must be specified.
public void setLocation(Location location)
Параметр | Описание |
---|---|
location | The Location to search around |
getRadiusInMeters()
Gets the radius in meters around the location to search.
public int getRadiusInMeters()
setRadiusInMeters(int)
Sets the radius in meters around the location to search.
public void setRadiusInMeters(int radiusInMeters)
Параметр | Описание |
---|---|
radiusInMeters | The radius in meters |
getResultsLimit()
Gets the number of results to retrieve.
public int getResultsLimit()
setResultsLimit(int)
Sets the number of results to retrieve.
public void setResultsLimit(int resultsLimit)
Параметр | Описание |
---|---|
resultsLimit | The number of results to retrieve |
getSearchText()
Gets the search text (e.g., category, name) to search for. Either the location or the search text (or both) must be specified.
public String getSearchText()
setSearchText(String)
Sets the search text (e.g., category, name) to search for. Either the location or the search text (or both) must be specified. If a search box is displayed, this will update its contents to the specified text.
public void setSearchText(String searchText)
Параметр | Описание |
---|---|
searchText | The search text |
onSearchBoxTextChanged(String, boolean)
Sets the search text and reloads the data in the control. This is used to provide search-box functionality where the user may be typing or editing text rapidly. It uses a timer to avoid repeated requerying, preferring to wait until the user pauses typing to refresh the data. Note that this method will NOT update the text in the search box, if any, as it is intended to be called as a result of changes to the search box (and is public to enable applications to provide their own search box UI instead of the default one).
public void onSearchBoxTextChanged(String searchText, boolean forceReloadEventIfSameText)
Параметр | Описание |
---|---|
searchText | The search text |
forceReloadEventIfSameText | If true, will reload even if the search text has not changed; if false, identical search text will not force a reload |
getSelection()
Gets the currently-selected place.
public GraphPlace getSelection()
RADIUS_IN_METERS_BUNDLE_KEY
public static final String RADIUS_IN_METERS_BUNDLE_KEY
RESULTS_LIMIT_BUNDLE_KEY
public static final String RESULTS_LIMIT_BUNDLE_KEY
SEARCH_TEXT_BUNDLE_KEY
public static final String SEARCH_TEXT_BUNDLE_KEY
LOCATION_BUNDLE_KEY
public static final String LOCATION_BUNDLE_KEY
SHOW_SEARCH_BOX_BUNDLE_KEY
public static final String SHOW_SEARCH_BOX_BUNDLE_KEY
DEFAULT_RADIUS_IN_METERS
public static final int DEFAULT_RADIUS_IN_METERS
DEFAULT_RESULTS_LIMIT
public static final int DEFAULT_RESULTS_LIMIT