How to clear AutoCompleteTextView with inputType = none

I need a dropdown menu in my UI. Following the instructions I found on I used AutoCompleteTextView with inputType="none". I need to reset it on button press and show the placeholder again, but if I use setText("") it will show an empty choice, I want to actually clear the AutoCompleteTextView and show the placeholder again. How can I accomplish it?

Answers 1

  • Try with this

    In java :

                //autoCompleteTextView.setText("");// or you can use this

    And this for Kotlin :

    button.setOnClickListener { v: View? ->
                autoCompleteTextView.isFocusable = false

Related Articles