I am using TextInputLayout
with the design support library 22.2.1.
I set the value of the EditText
programmatically, and when the screen appears, I can see that the hint of the TextInputLayout
overlaps the text inside, before moving in the floating position.
Here a simple layout:
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:id="@+id/editText1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="hint1" />
</android.support.design.widget.TextInputLayout>
In my Activity
:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_test);
EditText e1 = (EditText) findViewById(R.id.editText1);
e1.setText("TEXT TEST 1");
}
Does anyone know a workaround?