I want to insert TextInputEditText within the TextInputLayout programmatically, but, I can not do it, because I don't now how to do this and only my EditText is being displayed. OBS: the method is responsable to add 3 times, an EditText, but now I want to insert an TextInputLayout instead EditText
private void configLayout(View view, LinearLayout ll) {
String[] hint = new String[]{"Name", "E-mail", “Phone”};
for (int i = 0; i < 3; i++) {
LinearLayout temp = new LinearLayout(view.getContext());
temp.setOrientation(LinearLayout.VERTICAL);
temp.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,
LinearLayout.LayoutParams.WRAP_CONTENT));
TextInputEditText et = new TextInputEditText(view.getContext());
et.setHint(hint[i]);
LinearLayout.LayoutParams llpNome = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
llpNome.setMargins(0, 16, 0, 0);
et.setLayoutParams(llpNome);
temp.addView(et);
TextInputLayout til = new TextInputLayout(view.getContext(), null, R.style.stl_til);
LinearLayout.LayoutParams llpTil = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);
llpTil.setMargins(0, 16, 0, 0);
til.setLayoutParams(llpTil);
til.setHint(hint[i]);
temp.addView(til);
ll.addView(temp);
}
}