我正在使用MaterialAutoCompleteTextView组件。如果可能的话,我想为选定的项目设置不同的背景色。
这是当前的UI:

我希望做到这一点:

知道怎么解决吗?
发布于 2022-06-14 00:25:54
我在github中询问,解决方案是更新材料库并使用属性MaterialAutoCompleteTextView.setSimpleItemSelectedColor()来实现这一点。
(只在1.7.0-alpha 02之后才能提供)
https://github.com/material-components/material-components-android/issues/2754
https://stackoverflow.com/questions/72605135
复制相似问题