Can someone help me to figure out my problem? At the last row of my table, I have a button and I want it to be centered. Below is the coding snippet.
<TableRow>
<LinearLayout
android:id="@+id/linearLayout2"
android:layout_gravity="center"
android:layout_height="fill_parent"
android:layout_width="fill_parent">
<Button
android:id="@+id/button1"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="Button"/>
</LinearLayout>
</TableRow>
Thanks..
<TableRow
android:gravity="center_horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout android:id="@+id/linearLayout2"
android:layout_height="fill_parent"
android:layout_gravity="center"
android:layout_width="wrap_content">
<Button android:text="Button" android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
</Button>
<TextView
...
android:layout_width="wrap_content"
...
/>
</LinearLayout>
</TableRow>
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments