I am new to Android but I have this working code:
final android.support.design.widget.TextInputLayout Tlay=new
android.support.design.widget.TextInputLayout(MainActivity.this);
Tlay.setLayoutParams(new
ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT));
linear1.addView(Tlay);
final android.support.design.widget.TextInputEditText EditText1=new
android.support.design.widget.TextInputEditText(MainActivity.this);
EditText1.setHint("Material EditText");
EditText1.setLayoutParams(new LinearLayout.LayoutParams(android.widget.LinearLayout.LayoutParams.MATCH_PARENT, android.widget.LinearLayout.LayoutParams.WRAP_CONTENT)); Tlay.addView(EditText1);`
But now I want it to be outlined but I can't get it to work. I need it it to be written in Java without xml.