In this example, both android: stretchColumns and non-TableRow are used as sub-views of TableLayout. In this case, the non-TableRow sub-View is extended to the whole row, which is the separator we need to display.
<TableLayout xmlns: android = "http://schemas.android.com/apk/res/android"
Android: layout_width = "match_parent"
Android: layout_height = "match_parent"
Android: stretchColumns = "1">
<TableRow>
<TextView
Android: text = "@ string/table_layout_5_open"
Android: padding = "3dip"/>
<TextView
Android: text = "@ string/table_layout_5_open_shortcut"
Android: gravity = "right"
Android: padding = "3dip"/>
</TableRow>
<TableRow>
<TextView
Android: text = "@ string/table_layout_5_save"
Android: padding = "3dip"/>
<TextView
Android: text = "@ string/table_layout_5_save_shortcut"
Android: gravity = "right"
Android: padding = "3dip"/>
</TableRow>
<TableRow>
<TextView
Android: text = "@ string/table_layout_5_save_as"
Android: padding = "3dip"/>
<TextView
Android: text = "@ string/table_layout_5_save_as_shortcut"
Android: gravity = "right"
Android: padding = "3dip"/>
</TableRow>
<View
Android: layout_height = "2dip"
Android: background = "# FF909090"/>
<TableRow>
<TextView
Android: text = "@ string/table_layout_5_import"
Android: padding = "3dip"/>
</TableRow>
<TableRow>
<TextView
Android: text = "@ string/table_layout_5_export"
Android: padding = "3dip"/>
<TextView
Android: text = "@ string/table_layout_5_export_shortcut"
Android: gravity = "right"
Android: padding = "3dip"/>
</TableRow>
<View
Android: layout_height = "2dip"
Android: background = "# FF909090"/>
<TableRow>
<TextView
Android: text = "@ string/table_layout_5_quit"
Android: padding = "3dip"/>
</TableRow>
</TableLayout>