Questions tagged [autocompletetextview]

AutoCompleteTextView is an Android widget that automatically shows complete suggestions as the user types.

The AutoCompleteTextView obtains the list of suggestions from filtering its Adapter (which must be set to allow complete suggestions) using the text the user enters in the widget's input area. To trigger the list of suggestions the user must insert a minimum number of characters defined by the threshold attribute.

Useful links

1455 questions
141
votes
15 answers

Android: AutoCompleteTextView show suggestions when no text entered

I am using AutoCompleteTextView, when the user clicks on it, I want to show suggestions even if it has no text - but setThreshold(0) works exactly the same as setThreshold(1) - so the user has to enter at least 1 character to show the suggestions.
fhucho
  • 34,062
  • 40
  • 136
  • 186
92
votes
5 answers

How do I Use AutoCompleteTextView and populate it with data from a web API?

I want to use an AutoCompleteTextView in my activity and populate the data as the user types by querying a web API. How do I go about doing this? Do I create a new class and override AutoCompleteTextView.performFiltering, or do I use a custom…
user147862
83
votes
4 answers

Implementing SearchView in action bar

I need to create SearchView from my arrayList and show the suggestions in the drop-down list same this I look for tutorials that explain step by step how to build a SearchView in a action bar. I have read the documentation and following…
Matteo
  • 1,241
  • 2
  • 21
  • 28
66
votes
4 answers

Difference between MultiAutoCompleteTextView and AutoCompleteTextView

Can someone explain the difference between MultiAutoCompleteTextView and AutoCompleteTextView?
63
votes
14 answers

Show all items in AutocompleteTextView without writing text

I have a AutocompleteTextView and it works fine. When I write a word it shows the relevant result but I want to show all items without writing any word in AutocompleteTextView. How can I do that.
androidcodehunter
  • 21,567
  • 19
  • 47
  • 70
58
votes
9 answers

AutoCompleteTextView item selection programmatically

I have an AutoCompleteTextView that is filled with cities from an sqlite database that calls an AsyncTask on item click, recently I added an option to detect my location using the gps, so the problem is I can detect the city (i.e Beirut) and set the…
Hussein Yassine
  • 595
  • 1
  • 4
  • 6
54
votes
9 answers

Android AutoCompleteTextView with Custom Adapter filtering not working

I've the Custom CustomerAdapter public class CustomerAdapter extends ArrayAdapter { private final String MY_DEBUG_TAG = "CustomerAdapter"; private ArrayList items; private int viewResourceId; public…
Mithun Sreedharan
  • 49,883
  • 70
  • 181
  • 236
49
votes
7 answers

TextInputLayout and AutoCompleteTextView

I'm using TextInputLayout in my Android app to achieve that neat floating label effect for my input fields. I know that I should be using the TextInputEditText as well to allow hints to be displayed when in landscape mode and the input are fills the…
45
votes
4 answers

how to add listener to autocompletetextview, android?

I am trying to add listener that will react when an item is selected on the autocompletetextview...can anyone help //phonename is the autocompletetextview PhoneName.setOnItemSelectedListener(new OnItemSelectedListener() { public void…
Tony
  • 1,175
  • 4
  • 14
  • 22
43
votes
7 answers

Android Action Bar SearchView as Autocomplete?

I am using a SearchView in the Action Bar. I want to use autocomplete feature on the search view to get results from the database. Is this possible? Or do I need to use a custom text box and then add autocomplete to that?
Harsha M V
  • 54,075
  • 125
  • 354
  • 529
42
votes
5 answers

Dynamically updating an AutoCompleteTextView adapter

I want to periodically change the suggestions given by an AutoCompleteTextview by getting the list from a RESTful web service, and can't get it working smoothly. I set up a hard-coded list of suggestions to make sure it's…
jaybee
  • 1,897
  • 2
  • 16
  • 29
38
votes
3 answers

autocompletetextview setonitemselectedlistener not working

there i am trying to write code for authorisation activity. When i am putting some entry in inputEmail i expect that my inputPasword will be fileed automaticly if corresponding record exists. However onItemSelectedListener seemd not to work. When i…
Yarh
  • 4,459
  • 5
  • 45
  • 95
34
votes
10 answers

android autocompletetextview hint results hidden under keyboard

I have 3 autocompletetextview's in which i set its adapter to be an ArrayAdapter with a very simple textview layout. The autocompletextview hint results are showing, but are under the onscreen keyboard(i can see part of it). how can i make…
james
  • 26,141
  • 19
  • 95
  • 113
34
votes
1 answer

AutoCompleteTextView backed by CursorLoader

So I am having trouble extending the MultiAutoCompleteTextView and backing it with a CursorLoader, while simultaneously using a custom Tokenizer. The issue rises specifically with the mAdapter.setCursorToStringConverter(); call. The…
33
votes
9 answers

Android: Restrict user from selecting other than autocompletion suggestions?

I have provided an AutoCompleteTextView to show suggestions to the user. Based on the item selected by the user, I am getting the ID of the item and using it in data base side. Now my problem is to force the user to make selection only from…
Prabhu M
  • 3,534
  • 8
  • 48
  • 87
1
2 3
96 97