Has anyone figured out a way to change the hint text (the text displayed when the field is empty) at runtime instead of in the layout? The layout looks like this:
<android.support.design.widget.TextInputLayout style="@style/CreateAccount.Zip.Label"> <android.support.v7.widget.AppCompatEditText android:id="@+id/Zip" style="@style/CreateAccount.Zip" /> </android.support.design.widget.TextInputLayout>
The problem I have is that the Material Design field label animation gets broken if I set it at runtime :-( It just stays static if I set it at runtime...no motion at all when you start typing.
You have to change the TextInputLayout
hint:
TextInputLayout textInputLayout = (TextInputLayout) findViewById(R.id.my_text_input_layout);
textInputLayout.setHint("New hint");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With