我想在视图下方设计以在Android平板电脑上显示它。我想知道xml代码来设计这种视图。谁能帮我 ?使用Android选项卡的表格布局设计视图?
我现在用下面的代码... 但如何设置50%tablelayout在两侧
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:gravity="left" android:layout_height="fill_parent" android:id="@+id/relativeLayout1">
<TableLayout android:layout_toLeftOf="@+id/tableLayout2" android:id="@+id/tableLayout1" android:layout_width="wrap_content" android:layout_height="fill_parent">
<TextView android:text="table 1"></TextView>
</TableLayout>
<TableLayout android:layout_toRightOf="@+id/tableLayout1" android:id="@+id/tableLayout2" android:layout_width="wrap_content" android:layout_height="fill_parent">
<TextView android:text="table 2"></TextView>
</TableLayout>
</RelativeLayout>
是的,我会添加它。但如何使两个Tablelayout 50%的宽度。 – Mak
对于TableRow中的每个视图给android:layout_weight =“1”,我试过这个工作。 – Aju
它为我的兄弟工作。 – Aju