android - Change hint text on AppCompatEditText at runtime? -
has figured out way change hint text (the text displayed when field empty) @ runtime instead of in layout? layout looks 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 have material design field label animation gets broken if set @ runtime :-( stays static if set @ runtime...no motion @ when start typing.
i use following:
edittext userinput = (edittext) yourview.findviewbyid(r.id.yourid); userinput.sethint("something");
Comments
Post a Comment