What is android default color for disabled text in edittext?

Misagh Emamverdi picture Misagh Emamverdi · Nov 16, 2014 · Viewed 10.2k times · Source

I want to set hint color in EditText as disabled text color. So I am using android:textColorHint attribute. But I don't know how to do that:

android:textColorHint="@android:color/???"     // what should I select?
//OR
android:textColorHint="?android:attr/???"      // what should I select?

Edit: I can define the same color in values but I want to reference it to handle future changes.

Answer

Dima picture Dima · Sep 21, 2016

You can find answer in documentation
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%.