My listview item consists of three columns and three rows.I used TableLayout for it.The space between columns was not uniform but i managed by setting margins.Now the layout looks perfect.
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/dp18"
android:paddingLeft="@dimen/dp16"
android:paddingTop="@dimen/dp18"
android:stretchColumns="0,1,2">
<TableRow>
..
</TableRow>
<TableRow>
..
</TableRow>
<TableRow>
..
</TableRow>
</TableLayout>
But I wonder what is the ideal approach? What will be the difference in terms of optimization and performance if I have used four LinearLayouts (one outer horizontal linearlayout and three internal vertical linearlayout for three columns). As TableRow extends LinearLayout then indirectly I was using LinearLayout only.
Then, what is the Advantage of using single TableLayout instead of multiple LinearLayouts as TableRow extends LinearLayout only?