title: Programmatically set TextInputLayout Hint Text Color and Floating Label Color
body: <p>I use a TextInputLayout, I would want to programmatically set the hint text color and the floating label color if the input field is mandatory. Before moving to TextInputLayout I used to set the hint text color programmatically  using the following</p>
  
  <p><code>textField.setHintTextColor(Color.RED);</code></p>
  
  <p>Can someone guide me on how to set the hint text color and the floating label color programmatically for a TextInputLayout.</p>
  
  <p>In the screenshot attached i would want the hint text <strong>Address 1</strong> to be in red when not focused and the on focus the floating label <strong>Address 1</strong> should be in red.</p>
  
  <p><a href="https://i.stack.imgur.com/zlUf7.png" rel="noreferrer"><img src="https://i.stack.imgur.com/zlUf7.png" alt="enter image description here"></a></p>