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

1409 questions
135
votes
14 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
  • 31,862
  • 40
  • 125
  • 178
87
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…
AJ.
  • 2,595
  • 3
  • 20
  • 16
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,160
  • 2
  • 15
  • 23
64
votes
4 answers

Difference between MultiAutoCompleteTextView and AutoCompleteTextView

Can someone explain the difference between MultiAutoCompleteTextView and AutoCompleteTextView?
54
votes
13 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
  • 20,275
  • 17
  • 44
  • 68
51
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
  • 45,549
  • 69
  • 171
  • 232
43
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…
41
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
  • 50,335
  • 109
  • 326
  • 496
40
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,817
  • 2
  • 16
  • 28
35
votes
2 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
  • 985
  • 4
  • 11
  • 22
34
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,116
  • 4
  • 39
  • 88
33
votes
8 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
  • 25,347
  • 17
  • 92
  • 109
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,425
  • 8
  • 43
  • 81
33
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…
30
votes
2 answers

Android: Autocomplete TextView Similar To The Facebook App

I have an AutoCompleteTextView in my app. The app makes use of the Facebook SDK. I followed the code from this question on SO: https://stackoverflow.com/a/12363961/450534 to the dot and have a functioning search (filtering) activity. Now, how do I…
Siddharth Lele
  • 26,905
  • 15
  • 91
  • 144
1
2 3
93 94