My goal is to change the color of the floating text when this field loses focus, I explain: I have a login screen, in which the background is red, so the goal is that the text is white to avoid losing, the problem is that when this field has text and loses focus, change to the primary color
In the first element I have already entered information and the focus is on the second widget, and the color change is appreciated.
XML element:
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="prueba"
app:hintTextAppearance="@style/test_appearance">
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxLines="1"
android:padding="8dp"
android:textColor="@color/color.black"
android:background="@color/color.white"/>
</android.support.design.widget.TextInputLayout>
This is the style applied to the Widget:
<style name="test_appearance" parent="@android:style/TextAppearance">
<item name="android:textColor">@color/color.white</item>
<item name="android:textSize">14sp</item>
</style>