android - TextInputLayout not showing when View added programmatically -
i noticed strange behaviour of textinputlayout : when add following layout: <android.support.design.widget.textinputlayout android:layout_width="match_parent" android:layout_height="wrap_content"> <edittext android:id="@+id/txtfirstname" style="@style/edittextstyle" android:layout_width="match_parent" android:layout_height="match_parent" android:hint="in layout" android:singleline="true" /> </android.support.design.widget.textinputlayout> everything works expected. when inflate similar layout like: view v = layoutinflater.from(this).inflate(r.layout.edittext_w_surrounding_textinputlayout, null); edittext edittext = (edittext) v.findviewbyid(r.id.edittext); edittext.sethint("added programmatically"); viewgroup root = (viewgroup) findviewbyid(r.id....