Home » Android » spinner – how to create editable dropdown in android?

spinner – how to create editable dropdown in android?

Posted by: admin June 15, 2020 Leave a comment


Can anyone help me with how to make an editable dropdown in android?

How to&Answers:

If editable you should use AutoCompleteTextView.


I have the same problem too. I finally tried 2 means:

  1. Use AutoCompleTextView, it is pretty good.

  2. Use ListPopupWindow with a EditText. I finally used this and I wrote an article about it: http://maogm.com/blog/edittext-with-popuplist-en.html


The accepted answer helped me except I wanted the drop down to show immediately before the user starts typing (really an editable spinner) and didn’t care much about auto completetion, so I let it have the immediate drop down effect by adding:

autoCompleteTextView.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {

In case this helps someone.


Have you tried reading any tutorials?

For example:

and so forth. Google for android spinner tutorials.


I changed the ArrayAdapter method of spinner and i got my custom Spinner. just change the parameter of this method like

Spinner spinner = (Spinner) findViewById(R.id.Spinner01);
ArrayAdapter adapter=ArrayAdapter.createFromResource(This,R.array.statename,R.layout.mylayout);

In Which the mylayout file contains