AutocompleteFragment

public class AutocompleteFragment extends Fragment

This class is deprecated.
Use AutocompleteSupportFragment instead.

A fragment that provides auto-completion for places.

Use this class only if you are embedding this fragment in an Activity. For embedding in a FragmentActivity, use AutocompleteSupportFragment.

Inherited Constant Summary

Public Constructor Summary

Public Method Summary

void
onActivityResult(int requestCode, int resultCode, Intent data)
View
onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
void
void
setCountry(String country)
Restricts the autocomplete results to a particular country.
void
setHint(CharSequence hint)
Sets the hint text to display in the search input field when there is no text entered.
void
setLocationBias(LocationBias locationBias)
Biases the autocomplete results to a particular area.
void
setLocationRestriction(LocationRestriction locationRestriction)
Restricts the autocomplete results to a particular area.
void
setOnPlaceSelectedListener(PlaceSelectionListener listener)
Sets a listener that will be notified when a place is selected.
void
setPlaceFields(List<Place.Field> placeFields)
Sets the desired fields of the Place object returned from selecting an autocomplete result.
void
setText(CharSequence text)
Sets the text to display in the search input field.
void
setTypeFilter(TypeFilter typeFilter)
Restricts the autocomplete results to the given place type.

Inherited Method Summary

Public Constructors

public AutocompleteFragment ()

Public Methods

public void onActivityResult (int requestCode, int resultCode, Intent data)

Parameters
requestCode
resultCode
data

public View onCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)

Parameters
inflater
container
savedInstanceState

public void onDestroyView ()

public void setCountry (String country)

Restricts the autocomplete results to a particular country.

Parameters
country

public void setHint (CharSequence hint)

Sets the hint text to display in the search input field when there is no text entered.

If the hint is unset or explicitly set to null, the hint text will be set to the default value.

Parameters
hint

public void setLocationBias (LocationBias locationBias)

Biases the autocomplete results to a particular area.

Parameters
locationBias

public void setLocationRestriction (LocationRestriction locationRestriction)

Restricts the autocomplete results to a particular area.

Parameters
locationRestriction

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 setPlaceFields (List<Place.Field> placeFields)

Sets the desired fields of the Place object returned from selecting an autocomplete result.

Read more about Place Data Fields.

Parameters
placeFields

public void setText (CharSequence text)

Sets the text to display in the search input field.

Parameters
text

public void setTypeFilter (TypeFilter typeFilter)

Restricts the autocomplete results to the given place type.

Parameters
typeFilter

Enviar comentários sobre…