This is brilliant Martin, thank you very much! It’s unbelievable how messy it is to just style a TextInputLayout, it would have taken me days without your guide. Google sometimes really likes to complicate our lives.

As an addition, if you need to use a different colour for the TextInputEditText when it is focused (and it doesn’t correspond with your primaryColor), you can set a ColorStateList which takes care of the following states: