Page Summary
-
The
PlaceAutocompleteFragmentclass is deprecated. -
The Google Play Services Places SDK is deprecated and a new SDK is available.
-
This fragment provides auto-completion for places and should only be used for API 12 and above.
-
The fragment allows setting a bounds bias, filter, hint text, a place selection listener, and the initial text.
This class is deprecated.
The Google Play Services Places SDK is deprecated. A new SDK is available.
See the client
migration guide for more information.
A fragment that provides auto-completion for places.
Use this class only if you are targeting API 12 and above. Otherwise, use SupportPlaceAutocompleteFragment.
Inherited Constant Summary
Public Constructor Summary
Public Method Summary
| void |
setBoundsBias(LatLngBounds bounds)
Biases the autocomplete results to a particular area.
|
| void | |
| void |
setHint(CharSequence
hint)
Sets the hint text to display in the search input field when there is no text
entered.
|
| void |
setOnPlaceSelectedListener(PlaceSelectionListener
listener)
Sets a listener that will be notified when a place is selected.
|
| void |
Inherited Method Summary
Public Constructors
public PlaceAutocompleteFragment ()
Public Methods
public void setBoundsBias (LatLngBounds bounds)
Biases the autocomplete results to a particular area.
If the bounds are unset or explicitly set to null, the autocomplete results will be biased to the device's approximate location.
Parameters
| bounds | A LatLngBounds object that defines a geographical area using two sets of latitude/longitude coordinates marking the top left and bottom right corners. |
|---|
public void setFilter (AutocompleteFilter filter)
Sets a filter on autocomplete predictions.
Parameters
| filter | A filter to use for restricting the returned predictions. If null, a filter with no constraints will be used. |
|---|
public void setHint (CharSequence hint)
Sets the hint text to display in the search input field when there is no text entered.
public void setOnPlaceSelectedListener (PlaceSelectionListener listener)
Sets a listener that will be notified when a place is selected.
Parameters
| listener | The listener that should be notified. |
|---|
public void setText (CharSequence text)
Sets the text to display in the search input field.