我有一个包含两列和两行的 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:我工作的地方不允许我贴代码,所以我写的代码尽可能接近我的代码。不知道对不对,无法测试。