Atheos
Atheos

Reputation: 181

How to capture the AutoCompleteTextView arrow click event

Arrow

How do I capture the click on the AutoCompleteTextView arrow.

OnClick works for the rest of the component, but it doesn't work when you specifically click the arrow.

Upvotes: 4

Views: 1280

Answers (1)

Atheos
Atheos

Reputation: 181

It took a while, but I found the solution.

The event is in the parent of the AutoCompleteTextView.

XML:

XML

Solution:

public com.google.android.material.textfield.TextInputLayout txtGleba;

...

txtGleba = findViewById(R.id.txtGleba);
    txtGleba.setEndIconOnClickListener  (new View.OnClickListener() {
        @Override
        public void onClick(View v) {


        }
    });

Upvotes: 14

Related Questions