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
31
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
  • 27,623
  • 15
  • 98
  • 151
27
votes
6 answers

How can I avoid execution of onTextChanged in Android's EditText

How can I avoid that a code line like: ((EditText) findViewById(R.id.MyEditText)).setText("Hello"); Will cause an event here: ((EditText) findViewById(R.id.MyEditText)).addTextChangedListener(new TextWatcher() { @Override public void…
wildnove
  • 2,185
  • 2
  • 24
  • 32
27
votes
2 answers

Turn AutoCompleteTextView into a SearchView in ActionBar instead

I have a AutoCompleteTextView which gives user auto-completion search result from Google Places API. Once I was done I discovered SearchView and how it can be placed in the ActionBar. I checked out the SearchView example provided by google and added…
theAlse
  • 5,577
  • 11
  • 68
  • 110
26
votes
2 answers

How to avoid getting both called: onItemClicked and onTextChanged on AutoCompleteTextView

I have this code. When I choose an item from suggestion list, the onTextChanged happens first, then oItemClicked comes after that. Now I want when choosing a word, the "onItemClicked" appears first, then "onTextChanged". I took a look Android doc…
emeraldhieu
  • 9,380
  • 19
  • 81
  • 139
25
votes
3 answers

Android AutocompleteTextView using ArrayAdapter and Filter

Backgroud information The app I am currently writing deals with places. The main method to create a place is to enter an address. Providing a convenient way to do it is very important for the UX. Current solution After investigating the problem a…
a.b.d
  • 2,190
  • 3
  • 26
  • 26
24
votes
5 answers

how to set setOnClickListener for AutoCompleteTextView?

I am selecting text for AutoCompleteTextView.After i want apply setonclicklistener to selected text.if any have idea. ArrayAdapter arrAdapter = new ArrayAdapter(this, android.R.layout.simple_dropdown_item_1line, sampleACTV); …
sai
  • 2,562
  • 8
  • 31
  • 46
24
votes
5 answers

how to find the position of item in a AutoCompletetextview filled with Array

I have an array (array1 with States) and AutoCompleteTextview in which I'm filling it with array1. When I select the value from AutocompleteTextView I select a state from AutoCompleteTextView Dropdown What I want is to get the position of the item…
raghav chopra
  • 827
  • 3
  • 9
  • 25
24
votes
8 answers

AutocompleteTextView suggestion list goes up

possible duplicates Android : autocompletetextview, suggestion list displays above the textview? I am fully trying to display suggestion list overlapping on keyboard when suggestion list scroll by user but it always open up side. here I am getting…
Pratik
  • 30,639
  • 18
  • 84
  • 159
23
votes
10 answers

AutoCompleteTextview Color set white by default

I used an AutoCompleteTextView in my android app and it is working correctly. The only problem I am facing is that the color of the suggestions is white by default that is i am not able to see any suggestions. So when i start typing something the…
Antrromet
  • 15,294
  • 10
  • 60
  • 75
23
votes
2 answers

AutoCompleteTextView: Remove soft keyboard on back press instead of suggestions

When using AutoCompleteTextView, the dropdown suggestion list appears with the software keyboard still visible. This makes sense, as it is often a lot more efficient to type ensuing characters to narrow the list. But if the user wants to navigate…
22
votes
5 answers

AutoCompleteTextView - disable filtering

I'm retrieving a list of strings from a webservice and I want to list them up on a AutoCompleteTextField regardless of the built-in AutoCompleteTextField filters. How do I do that? is there a way to disable it's inner filtering easily (preferably…
Alon Amir
  • 4,913
  • 9
  • 47
  • 86
22
votes
4 answers

Changing the width of AutoCompleteTextView in Android

I've been stumped on this for a few days. I have an autoCompleteTextView and a button split 50/50 in my layout. The autocomplete works, but the suggestions only take up half of the screen (equivalent to the size that my textView takes up). How could…
EGHDK
  • 17,818
  • 45
  • 129
  • 204
22
votes
2 answers

Converting an ArrayAdapter to CursorAdapter for use in a SearchView

How can I convert an ArrayAdapter of static data into a CursorAdapter for using Suggestion Listener in SearchView? I have constructed the ArrayAdapter from static data (allString) ArrayAdapter searchAdapter = new…
21
votes
5 answers

android AutoCompleteTextView white on white Dropdown list

breaking my head here, i have searched online for quite a bit and it seems this was a bug on android before but have not found a solution yet. I have a AutoCompleteTextView: autodesignations = (AutoCompleteTextView)…
21
votes
4 answers

How to get the index of the Text selected in an AutoCompleteTextView

AutoCompleteTextView mActv = (AutoCompleteTextView) findViewbyId(R.id.m_actv); ArrayAdapter AutoCompleteAdapter = new ArrayAdapter(this, R.layout.dropdown_text,…
Archie.bpgc
  • 23,812
  • 38
  • 150
  • 226
1
2
3
96 97