How do you get a view to position itself left, right and center in a TableLayout row? Or linear layout?
You can use the android:gravity property to set the alignment you want.
<TableRow android:gravity="center">
<LinearLayout android:layout_width="fill_parent"
android:layout_height="wrap_content" android:gravity="center">
</LinearLayout>
</TableRow>
When working on the TableLayout, look for the streachColoum property. Also make it * if you want all the table columns to auto fit.
精彩评论