【发布时间】:2013-05-23 12:48:44
【问题描述】:
我有一个包含两列和两行的 tableLayout,行和最后一列都有 match_parent 作为宽度,但布局没有填充父宽度,它本身就像有 wrap_content 一样。
代码如下:
<TableLayout android:layout_width="match_parent">
<TableRow android:layout_width="match_parent">
<TextView
android:layout_width="wrap_content"
android:text="static" />
<EditText
android:layout_width="match_parent"
android:text="text" />
</TableRow>
<TableRow android:layout_width="match_parent">
<TextView
android:layout_width="wrap_content"
android:text="static2" />
<EditText
android:layout_width="match_parent"
android:text="text2" />
</TableRow>
</TableLayout>
对于具有父级宽度的每一行我需要做什么?
Ps:我工作的地方不允许我发布我的代码,所以我写的代码尽可能接近我的代码。不知道对不对,无法测试。
【问题讨论】:
标签: android android-layout android-tablelayout