Hello,
probably I don't understand the layout properties of TableLayout yet. It doesn't seem to be possible to achieve such a flexible table like in HTML, because there are no cells. My target is it to achieve such a layout:
How can I do that? I thought about using a GridView but this doesn't seem to be useful in XML. My efforts look like this:
<TableLayout
android:id="@+id/tableLayout"
android:layout_width="320sp"
android:layout_height="fill_parent"
android:layout_gravity="center_horizontal"
android:gravity="bottom"
android:layout_alignParentBottom="true">
<TableRow
android:background="#333333"
android:gravity="bottom"
android:layout_width="fill_parent">
<Button
android:id="@+id/btnUp"
android:layout_width="60sp"
android:layout_height="50sp"
android:gravity="left"
android:text="Lift U"
/>
<Button
android:id="@+id/btnScreenUp"
android:gravity="right"
android:layout_gravity="right"
android:layout_width="60sp"
android:layout_height="50sp"
android:text="Scrn U"
/>
</TableRow>
<TableRow
android:background="#444444"
android:gravity="bottom"
android:layout_gravity="right">
<Button
android:id="@+id/btnDown"
android:layout_width="60sp"
android:layout_height="50sp"
android:text="Lift D"
/>
<Button
android:id="@+id/btnScreenLeft"
android:layout_width="60sp"
android:layout_height="50sp"
android:gravity="right"
android:layout_gravity="right"
android:text="Scrn L"
/>
<Button
android:id="@+id/btnScreenDown"
android:layout_width="60sp"
android:layout_height="50sp"
android:gravity="right"
android:layout_gravity="right"
android:text="Scrn D"
/>
<Button
android:id="@+id/btnScreenRight"
android:layout_width="60sp"
android:layout_height="50sp"
android:gravity="right"
android:layout_gravity="right"
android:text="Scrn R"
/>
</TableRow>
</TableLayout>