This is my code:
<TableRow android:layout_width="fill_parent" android:layout_height="0dp" android:layout_weight="1" android:orientation="horizontal" > <TextView android:id="@+id/TextView" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="This Button:" android:layout_marginLeft="14dp" /> <ToggleButton android:id="@+id/toggleButton" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="ToggleButton" /> <FrameLayout android:layout_width="0dp" android:layout_height="fill_parent" android:layout_weight="0.9" > </FrameLayout> </TableRow>
When I run my application, it looks like this:
This Button: Togglebutton
There is a lot of space between the text view and the toggle button.
source share