MaterialAutoCompleteTextView dropdown selected item background color

433 Views Asked by At

I am using the MaterialAutoCompleteTextView component. I would like if possible to set a different background color for selected item.

This is the current UI:

enter image description here

I would like to achieve this:

enter image description here

Any idea how to solve it?

1

There are 1 best solutions below

1
AndroidRuntimeException On

I asked in the github and the solution is update the material library and use the property MaterialAutoCompleteTextView.setSimpleItemSelectedColor() to achieve that.

(only available since 1.7.0-alpha02.)

https://github.com/material-components/material-components-android/issues/2754