Set the layout weight of a TextView programmatically

I’m trying to dynamically create TableRow objects and add them to a TableLayout.
The TableRow objects has 2 items, a TextView and a CheckBox. The TextView items need to have their layout weight set to 1 to push the CheckBox items to the far right.

I can’t find documentation on how to programmatically set the layout weight of a TextView item.

12 Answers
12

Leave a Comment