title: How to make TextInputLayout hint asterisk red for required fields
body: <p>Is it possible to make just the asterisk in the hint red when using a TextInputLayout from the design support library? I have seen information on styling the entire hint, but this is a little more complex since only the * should be red, not the whole message.</p>
  
  <p>The Material Design example shows this, but the design library doesn't seem to have any option to style it this way using a TextInputLayout and EditText.</p>
  
  <p>Reference:
  <a href="https://www.google.com/design/spec/components/text-fields.html#text-fields-required-fields" rel="noreferrer">https://www.google.com/design/spec/components/text-fields.html#text-fields-required-fields</a></p>
  
  <p>Example (the top, with focus, has the red asterisk; the bottom without focus does not have a red asterisk):</p>
  
  <p><a href="https://i.stack.imgur.com/EmyXD.png" rel="noreferrer"><img src="https://i.stack.imgur.com/EmyXD.png" alt="Example of hint text with red asterisk"></a></p>
  
  <p>I looked into setting the hint to a SpannableString (see here <a href="https://stackoverflow.com/questions/6456588/how-to-get-a-red-asterisk-in-a-string-entry">How to get a red asterisk in a &lt;string&gt; entry</a>) in an OnFocusChangeListener (see here <a href="https://stackoverflow.com/questions/33414066/having-the-mandatory-symbol-to-the-edit-text-red-color-asterisk-which-is-insid">Having the mandatory symbol to the edit text (red color asterisk) which is inside the textinputlayout</a>), but the hint is a CharSequence.  </p>
  
  <p>Is there any way to do this without extending TextInputLayout?</p>