Suppose I have the following layout
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/TableLayout">
<TableRow android:id="@+id/TableRow01" >
<Button android:text="1" android:id="@+id/button01"/>
<Button android:text="2" android:id="@+id/button02"/>
<Button android:text="3" android:id="@+id/button03"/>
<Button android:text="4" android:id="@+id/button04"/>
</TableRow>
<TableRow android:id="@+id/TableRow01" >
<Button android:text="5" android:id="@+id/button05"/>
<Button android:text="6" android:id="@+id/button06"/>
<Button android:text="7" android:id="@+id/button07"/>
<Button android:text="8" android:id="@+id/button08"/>
</TableRow>
</TableLayout>
How could I swap position of button01
with button02
? And would it work also for swapping button01
with button05
?
Before asking what I have tried so far, I don't even know where to start. I googled but the only answer I could find was about AbsoluteLayout
, which is not what I need.