Best code examples for Android AutoCompleteTextView class (android.widget.AutoCompleteTextView)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android AutoCompleteTextView class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Android AutoCompleteTextView examples from Open Source projects
This code example shows how to use the following methods: setAdapter, setOnItemClickListener, setThreshold, addTextChangedListener, setMaxLines
37:	view.setAdapter( new StationsAdapter( context, service, history ) ); 
38:	view.setMaxLines( 1 ); 
39:	view.setThreshold( 1 ); 
40:	view.addTextChangedListener( this ); 
41:	view.setOnItemClickListener( this ); 
42:	view.setOnKeyListener( this ); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setAdapter, setOnItemClickListener
63:	searchField.setAdapter(suggestionHelper.getAdapter()); 
64:	searchField.setOnItemClickListener(this); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setAdapter, setThreshold, setText, requestFocus, setVisibility
89:	textoBuscar.setVisibility(View.VISIBLE); 
90:	textoBuscar.setText(""); 
91:	textoBuscar.requestFocus(); 
-
100:	textoBuscar.setAdapter(adapter); 
101:	textoBuscar.setThreshold(2); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getAdapter, isPopupShowing, setAdapter, getText
165:	if (mAutoCompleteTextView != null && !mAutoCompleteTextView.isPopupShowing()) { 
166:	filterOnString(mAutoCompleteTextView.getText().toString()); 
-
174:	if (mAutoCompleteTextView.getAdapter() == null) { 
175:	mAutoCompleteTextView.setAdapter(mFilterAdapter); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getAdapter, setText
218:	ArrayAdapter<String>adapterPwd=(ArrayAdapter<String>) actvPwd.getAdapter(); 
-
223:	actvPwd.setText(pwd); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setAdapter, setOnItemClickListener
214:	final AutoCompleteTextView edchoose = new AutoCompleteTextView(StorybookActivity.this); 
-
216:	edchoose.setAdapter(aa); 
217:	edchoose.setOnItemClickListener(new AdapterView.OnItemClickListener() { 
-
231:	builder.setPositiveButton("Ok", new OnClickListener() { 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setOnItemClickListener, addTextChangedListener, setOnClickListener
108:	tv.addTextChangedListener(new TextWatcher() { 
-
156:	tv.setOnItemClickListener(new OnItemClickListener() { 
-
177:	tv.setOnClickListener(new OnClickListener() { 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: isPopupShowing, dismissDropDown
91:	if (mTextView.isPopupShowing()) { 
92:	mTextView.dismissDropDown(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: isPopupShowing, dismissDropDown
91:	if (mTextView.isPopupShowing()) { 
92:	mTextView.dismissDropDown(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setAdapter, setThreshold
167:	final AutoCompleteTextView ingrediente = new AutoCompleteTextView(this); 
168:	ingrediente.setAdapter(adapter); 
169:	ingrediente.setThreshold(2); 
Full Snippet Info
5
CodeRank
Related Android AutoCompleteTextView Questions & Answers:
Other Android AutoCompleteTextView Examples
1:	// Get a reference to the AutoCompleteTextView in the layout
2:	AutoCompleteTextView textView = (AutoCompleteTextView) findViewById(R.id.autocomplete_country);
3:	// Get the string array
4:	String[] countries = getResources().getStringArray(R.array.countries_array);
-
1:	// Get a reference to the AutoCompleteTextView in the layout
2:	AutoCompleteTextView textView = (AutoCompleteTextView) findViewById(R.id.autocomplete_country);
3:	// Get the string array
4:	String[] countries = getResources().getStringArray(R.array.countries_array);

Read More

AutoCompleteTextView Class Overview
An editable text view that shows completion suggestions automatically while the user is typing. The list of suggestions is displayed in a drop down menu from which the user can choose an item to replace the content of the edit box with.The drop down can be dismissed at any time by pressing the back key or, if no item is selected in the drop down, by pressing the enter/dpad center key.The list of suggestions is obtained from a data adapter and appears only after a given number of characters defined by the threshold.The following code snippet shows how to create a text view which suggests various countrie...
Methods
  • getAdapter
    Returns a filterable list adapter used for auto completion.
  • setAdapter
    Changes the list of data used for auto completion.
  • setOnItemClickListener
    Sets the listener that will be notified when the user clicks an item in the drop down list.
  • setThreshold
    Specifies the minimum number of characters the user has to type in the edit box before the drop down list is shown.