I want to have a layout that is split in two parts vertical . My App is always in landscape mode.
Please help.
I tried it with a tablelayout.
<TableLayout android:id="@+id/tableLayout1"
android:stretchColumns="*" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android">
<TableRow android:id="@+id/tableRow1"
android:layout_width="fill_parent" android:layout_height="wrap_content">
</TableRow>
</TableLayout>
I’m not a fan of
TableLayout, so I’ll try to explain you how to achieve this by using theLinearLayout. You need to set your layout’s orientation to horizontal usingandroid:orientation="horizontal". Then you should create twoLinearLayoutsinside, both havingandroid:layout_width="fill_parent"andandroid:layout_weight="1". Then you can put anything inside these layouts, and the whole view will be split in two horizontal parts. Hope this helps!