У меня странная проблема с кнопками переключения. Я хочу отцентрировать их по горизонтали и расположить их один под другим, используя относительную компоновку.
Однако, что бы я ни делал - они всегда оказываются рядом
Есть идеи?
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/bg7"
xmlns:android="http://schemas.android.com/apk/res/android">
<TextView android:id="@+id/spacer"
android:layout_width="fill_parent"
android:layout_height="50dip"
android:text=" ">
</TextView>
<TableRow android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/spacer"
android:paddingTop="5dip"
android:paddingBottom="10dip"
android:gravity="center">
<ToggleButton android:id="@+id/ShowNotification"
android:onClick="switchNotification"
android:textOn="Show Notification"
android:layout_width="220dip"
android:layout_height="50dip"
android:layout_above="@+id/UpdateLog"
android:textOff="No Notification"/>
<ToggleButton android:id="@+id/UpdateLog"
android:layout_width="220dip"
android:layout_height="50dip"
android:onClick="swtichLogging"
android:textOn="Log"
android:textOff="Don't Log"/>
</TableRow>
</RelativeLayout>
Заранее спасибо