Can I get the default hint color of an EditText?

Marian Klühspies picture Marian Klühspies · Mar 18, 2014 · Viewed 8.9k times · Source

Is there a way to get the hint color from an EditText?

I need the color to set it as the text color of the EditText too

Answer

Tadej picture Tadej · Mar 18, 2014

I guess you could use this:

final ColorStateList colors = editText.getHintTextColors();
editText.setTextColor(colors);

Note that hint color is actually a ColorStateList.