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

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -