I am generating editTexts in a TableRow and the editTexts width is wrapping the content by default. I tried to set their width to match_parent like this:
TableRow tr = new TableRow(getActivity());
EditText et = new EditText(getActivity());
LayoutParams lparams = new TableRow.LayoutParams(
LayoutParams.MATCH_PARENT,
LayoutParams.WRAP_CONTENT);
et.setLayoutParams(lparams);
It did not change anything, but i can set their width if i replace LayoutParams.MATCH_PARENT
with an integer. Could you please point me in the right direction to see why i cannot set their width to MATCH_PARENT
?