FAQ Database Discussion Community


Dropdown for AutoCompleteTextView has items but they are not visible

android,android-layout,autocompletetextview
I'm using the AutoCompleteTextView component to filter member data. I've set it up in my layout file as follows <AutoCompleteTextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/autocomplete_swap_pool" android:layout_width="match_parent" android:layout_centerVertical="true" android:gravity="center_vertical" android:layout_height="@dimen/nfl_my_listings_and_my_bids_spinner_height" android:layout_toLeftOf="@id/icon_on" android:dropDownSelector="@color/black"...

Android AutoCompleteTextView from ArrayList not showing

android,autocompletetextview
I am trying to set an AutoCompleteTextView field edtNumeAsig and after 3 characters are written down in it I am trying to update the autocomplete. Unfortunatelly from this demo I couldn't make it work, auto complete isn't displaying. ArrayList<String> ASIGURATORI = new ArrayList<String>(); ASIGURATORI.add("BAFF"); ASIGURATORI.add("fsfsg"); ASIGURATORI.add("BAFFFEFEFF"); ASIGURATORI.add("444"); ArrayAdapter<String> adapter =...

Android ArrayAdapter dynamic adding more data on scrolling

android,adapter,android-arrayadapter,autocompletetextview
I want to add some data at scrolling time whenever scroll reaches its 5 position but getting error ArrayOutOfBoundException... //Set adapter in MainActivity Context context = this; ArrayList<String> data = new ArrayList<String> ; for(int i =0; i <20;i++){ data.add("a"); } CustomAdapter customAdapter = new CustomAdapter( context, data); autoComplete.setAdapter(customAdapter); // Custom...

AutoCompleteTextView is taking much time to search in huge Sqlite database

android,performance,sqlite,autocompletetextview,custom-adapter
I have my own dictionary application WordYard and in that whenever we type in AutoCompleteTextView i am showing the words list in dropdown. In addTextChangedListener of autoCompleteTextView i am querying for written text in sqlite database. Since database is very huge of 1.5 lac words it takes time to make...

How to set EditText value it depend on AutoCompleteTextView value in Android?

android,android-edittext,autocompletetextview
There are one AutoCompleteTextView, Edittext and Button in dialog box. If AutoCompleteTextView is used Focus on dropdown. so it can easily select. If anyone select AAA in autocompletetextview then set edittext value to BBB. eg. If select CCC then set editext value to DDD. EditText value will be change by...

Android - AutoCompleteTextView not showing after setText is called

android,autocompletetextview
I'm having a weird issue with AutoCompleteTextView. I have a AutoCompleteTextView that shows suggestions of cities when typing in it. The list of cities is retrieved from a remote server via JSON. When I use the soft keyboard or the Mic Button on the soft keyboard, the suggestions work fine....

How to add space to AutoCompleteTextView suggestion

android,autocompletetextview,searchview
I would like to add space when the user select text from the auto complete suggestions, so when he continue to type he will start from a new word. I tried to do it using TextWatcher but I get IndexOutOfBoundsException. Any suggestions? the text watcher I used is: private class...

Bad cursor color on custom edittext

android,android-edittext,autocompletetextview
I tried to override the AutoCompleteTextView and the cursor in the field is now white. Because of bright gray background it is difficult to recognize them. I don't understand how it could be possible, I didn't set any custom style, the other fields are ok and show standart green cursor....

Soft keyboard not hidden when Done clicked in AutocompleteTextView

android,autocompletetextview
I have several EditText in my app, and when the "Done" key is clicked the soft keyboard is hidden. This does not happen with AutocompleteTextView. Any idea why? Is there anything more to do to get the same behaviour with AutocompleteTextView? <AutoCompleteTextView android:id="@+id/autoCompleteTextView" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:layout_below="@id/search_zip" android:layout_toLeftOf="@id/submit" android:paddingLeft="10dp"...

Android AutoCompleteTextview click not working

android,autocomplete,autocompletetextview,simpleadapter
I tried AutoCompleteTextView and getting the values but i can't get the values in the click event of the autocompletetextview this is my layout <AutoCompleteTextView android:id="@+id/atv_places" android:layout_width="match_parent" android:layout_height="40dp" android:layout_below="@+id/lin" android:layout_gravity="center" android:layout_marginLeft="25dp" android:layout_marginRight="25dp" android:layout_marginTop="10dp" android:background="@drawable/et_chat" android:drawableLeft="@drawable/searchblue"...

Auto Complete TextView not showing drop down after 1 character

android,google-places-api,autocompletetextview
I am using autocomplete textview to display places from google places api.I have also set the threshold value to 1 still if the user types a character the drop down dosent occur.It occurs when the user types the 2 character.I dont know why this is happening.Please do help me out...

Dynamically created autocompletetextview shows only selected row after orientation change

android,autocompletetextview
I am trying to create an AutoCompleteTextView dynamically for use like a spinner in Android. I have made it work properly with showing the dropdown list on click and on focus change. But when I change orientation after selecting any option, only the selected option is shown in the dropdown...

To customize the list of an AutocompleteTextView

android,listview,autocompletetextview
Hi I'm trying to create an AutoCompleteTextView as shown in the following image. The resulting list of this AutoCompleteTextView should be placed below the country edit text. Can anyone please help me how I can achieve this? ...

android - enter multiple string values to edittext

android,android-edittext,autocompletetextview
I have an app in android that handles reporting about classes taken. I have a edittext that is for entering the teacher's name, but there is a possibilty that there are more then one teacher. I want to put all the names in the same edittext, similar to how its...

AutoCompleteText in Fragments

java,android,android-fragments,autocompletetextview
I'm trying to create a AutoCompleteText in Fragments, I've seen a lot of examples, and didn't work for me... I'm always getting the same error with the adapter. The thing is on my code does not appears any error, but at the time I launch my APP and click on...

Google Places API returns INVALID_REQUEST (Android)

android,json,google-places-api,autocompletetextview,api-key
I'm using for the first time the Google Places API on Android, because I need an AutoCompleteTextView which suggests places when the user types on it. So, I've activated the Google Places API and I've created the API key, a browser key as some tutorial says. When i run the...

To obtain data from Json

android,json,arraylist,autocompletetextview
I would like to obtain the countryId, countryName details from the following a Json (Please refer to the screenshot: http://i.imgur.com/DDs9rGT.png). Here is my code: http://prntscr.com/76jbm4 here: ArrayList companyName = new ArrayList(); AutoCompleteTextView country_editText; This AutoCompleteTextView shows user a list of country names and I would like to obtain the countryId...

Autocompletetextview suggestion width fill parent

java,android,autocompletetextview
I want to show the suggestion of Autocompletetextview to fill parent, but on 4.X devices it is showing with some transparent border like on screen: My code is like this: Point pointSize = new Point(); getWindowManager().getDefaultDisplay().getSize(pointSize); editText.setDropDownWidth(pointSize.x); And my layout for it: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="match_parent" android:background="@color/vanilla"...

How to implement autocompletetextview with listview?

android,json,listview,search,autocompletetextview
I am getting response from server and display it using listview and it works fine,now what I am trying is i added autocompletetextview to search items by name,but when i run my app it crashes and showing errors..i already ask this Tab1Activity.java public class Tab1Activity extends ListActivity{ private ProgressDialog pDialog;...

Setting value in AutoCompleteTextView

android,autocompletetextview
I have a AutoCompleteTextView with a list of items, and I need select one of them... I am doing something like: myAutoCompleteTextView.setListSelection( index); and... myAutoCompleteTextView.setText( index); but don't work... How can I set a item by default?...

Using AutoCompleteTextView to change current dispaly page

android,autocompletetextview
There is a AutoCompleteTextView and when user write for-example blue and select it from AutoCompleteTextView, the current page change to that particular page. Here is the code: public class MainActivity extends Activity { private AutoCompleteTextView et_search_game; private TextView TextViewForAutoComplete; private static String[] GAMES_NAME = new String[] { "blue", "red", "black"...