Tablerow Is Being Added But Doesn't Display
I have a small app that periodically needs a table row added to the tablelayout. Per the getChildCount() method the row is being added but it doesn't display. Any suggestions wou
Solution 1:
Have you run the code for adding a row in your TableLayout
? I've simulated adding a row on a click of a Button
and I get a awkward Divide by 0
exception.
Anyway, change the LayoutParams
of the enclosing Linearlayout
to TableRow.LayoutParams
(its parent is the TableRow
):
TableRow.LayoutParamslp=newTableRow.LayoutParams(
TableRow.LayoutParams.FILL_PARENT,
TableRow.LayoutParams.WRAP_CONTENT, 1.0f);
ll.setId(1589);
ll.setLayoutParams(lp)
Also, if this doesn't solve the problem, try to add:
android:fillViewport="true"
to the ScrollView
tag in the xml layout.
Post a Comment for "Tablerow Is Being Added But Doesn't Display"