Try adding android:layout_marginRight="8dp" view in the column to the left of the place where you want the space for each line in the XML layout. It worked for me.
Even better, you can put the fill size in the values ββ/dimens.xml file and specify the margin from there.
For instance:
values ββ/ dens.xml
<resources> <dimen name="column_1_right_margin">8dp</dimen> </resources>
Layout / table.xml
<TableLayout ... layout params> <TableRow> <TextView ... layout params android:layout_marginRight="@dimen/column_1_right_margin" /> <TextView ... layout params /> </TableRow> <TableRow> <TextView ... layout params android:layout_marginRight="@dimen/column_1_right_margin" /> <TextView ... layout params /> </TableRow> </TableLayout>
To clear it even more and stop duplicating code, you can create a style for column 1, then all you need to do is apply a style for each View in the first column. See here for more details .
source share