I am implementing a table layout and adding table rows to it dynamically. I want give space between these rows. may I know how to do it. I am also adding a textView to the tableRow. I am declaring the table layout in the xml file. I tried giving padding inside the table row. But that seems to work within the tableRows and not between tableRows. please help.
Asked
Active
Viewed 1.2k times
1
-
Can you please share with us what was it that you corrected ? I am having troubles setting space between columns in a tableLayout which is within a LinearLayout. – Jul 15 '11 at 13:51
2 Answers
3
You need to set the top or bottom margin of rows.
Here is an example: Programmatically set margin for TableRow
-
There may be something else in your layout which is preveting it, you need to experiment by starting with a simple working solution and then move to the complex final. – Lumis Mar 18 '11 at 14:53
-
I am declaring only the table layout in my layout file. rest I am doing it programatically. – Droidme Mar 19 '11 at 04:38
-
1
-
@Droidme:if u share the solution ..........with us we will be happy..... i am facing the same problem trying to set margin between rows programatically...thanks – sanjay Jan 12 '12 at 19:31