我想将 EditText
中的提示颜色设置为禁用的文本颜色。所以我正在使用 android:textColorHint
属性。但我不知道该怎么做:
android:textColorHint="@android:color/???" // what should I select?
//OR
android:textColorHint="?android:attr/???" // what should I select?
编辑:我可以在值中定义相同的颜色,但我想引用它来处理 future 的变化。
最佳答案
你可以在文档中找到答案
https://material.google.com/style/color.html#color-text-background-colors
For dark text on light backgrounds, apply the following opacity levels:
The most important text has an opacity of 87%.
Secondary text, which is lower in the visual hierarchy, has an opacity of 54%.
Text hints (like those in text fields and labels) and disabled text have even lower visual prominence with an opacity of 38%.
关于android - edittext 中禁用文本的 android 默认颜色是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26954758/