PlacePickerFragment
Diese Klasse ist in der neuesten Version des SDKs nicht mehr verfügbar.
Es ist eine neuere Version dieser Klasse verfügbar. Sieh sie dir an mit der aktuellsten Version.
Erweiterungen:PickerFragment
Package:widget
Konstruktoren
PlacePickerFragment()

Default constructor. Creates a Fragment with all default properties.

public PlacePickerFragment()
PlacePickerFragment(Bundle)

Constructor.

public PlacePickerFragment(Bundle args)
ParameterBeschreibung
argsA Bundle that optionally contains one or more values containing additional configuration information for the Fragment.
Instance-Methoden
getLocation()

Gets the location to search around. Either the location or the search text (or both) must be specified.

public Location getLocation()
Returns
The Location to search around
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)
ParameterBeschreibung
locationThe Location to search around
getRadiusInMeters()

Gets the radius in meters around the location to search.

public int getRadiusInMeters()
Returns
The radius in meters
setRadiusInMeters(int)

Sets the radius in meters around the location to search.

public void setRadiusInMeters(int radiusInMeters)
ParameterBeschreibung
radiusInMetersThe radius in meters
getResultsLimit()

Gets the number of results to retrieve.

public int getResultsLimit()
Returns
The number of results to retrieve
setResultsLimit(int)

Sets the number of results to retrieve.

public void setResultsLimit(int resultsLimit)
ParameterBeschreibung
resultsLimitThe 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()
Returns
The search text
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)
ParameterBeschreibung
searchTextThe 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)
ParameterBeschreibung
searchTextThe search text
forceReloadEventIfSameTextIf 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()
Returns
The currently-selected place, or null if there is none
Konstanten
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. The default is 1000 meters.
public static final String RADIUS_IN_METERS_BUNDLE_KEY
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. The default is 100 results.
public static final String RESULTS_LIMIT_BUNDLE_KEY
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. The default is to have no search text.
public static final String SEARCH_TEXT_BUNDLE_KEY
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.
public static final String LOCATION_BUNDLE_KEY
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.
public static final String SHOW_SEARCH_BOX_BUNDLE_KEY
DEFAULT_RADIUS_IN_METERS
The default radius around the center point to search.
public static final int DEFAULT_RADIUS_IN_METERS
DEFAULT_RESULTS_LIMIT
The default number of results to retrieve.
public static final int DEFAULT_RESULTS_LIMIT