I dynamically create textInputlayout and add it to my lienarlayot using the code below:
LinearLayout.LayoutParams params = new
LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,
LinearLayout.LayoutParams.WRAP_CONTENT);
params.setMargins(10,10,10,10);
til.setLayoutParams(params);
til.setHint("Label");
til.setId(i+1);
TextInputEditText et = new TextInputEditText(til.getContext());
et.setSingleLine(true);
til.addView(et);
til.setBoxCornerRadii(R.dimen.CornerRadious,R.dimen.CornerRadious,R.dimen.CornerRadious,
R.dimen.CornerRadious);
information.addView(til);
I want to change boxStrokeColor , CursorColor and HintTextColor.
I use the following code block to change boxStrokeColor
til.setBoxStrokeColor(getResources().getColor(R.color.white));
But that code block only change the boxStrokeColor of TextInputLayout (white) when I click the TextInputLayout ,without click it's color is black. How can I set it's color white ?



