我在如何为我的android应用程序努力create this layout[ImageShack Link]。与Android布局拼搏
我试着将几个东西嵌套到对方,但我不断收到错误,我终于有一些代码不会像我想要的那样。我希望我能了解我应该使用哪些布局以及如何将它们嵌套在一起。
这里是我的XML代码:
<?xml version="1.0" encoding="utf-8"?>
<TableLayout android:id="@+id/TableLayout01" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android">
<TableRow android:id="@+id/TableRow01" android:layout_width="fill_parent" android:layout_height="fill_parent">
<TextView android:text="94.6" android:id="@+id/id_number" android:layout_width="fill_parent" android:layout_height="fill_parent"></TextView>
</TableRow>
<TableRow android:id="@+id/TableRow02" android:layout_width="fill_parent" android:layout_height="fill_parent">
<TextView android:text="KG" android:id="@+id/id_unit" android:layout_width="fill_parent" android:layout_height="fill_parent"></TextView>
</TableRow>
<TableRow android:id="@+id/TableRow03" android:layout_width="fill_parent" android:layout_height="fill_parent">
<Button android:text="@+id/Add" android:id="@+id/add_button" android:layout_width="fill_parent" android:layout_height="wrap_content"></Button>
<Button android:text="@+id/View" android:id="@+id/view_button" android:layout_width="fill_parent" android:layout_height="wrap_content"></Button>
</TableRow>
</TableLayout>