【发布时间】:2015-07-30 22:35:55
【问题描述】:
如何为下图制作android布局?但我希望每一列都有相同的宽度
我已创建,但每列的宽度不能相同
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:weightSum="2"
android:layout_height="fill_parent">
<TableLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#9812AC">
<TableRow>
<TextView
android:layout_width="wrap_content"
android:layout_height="100dip"
android:text="Happy Vendor3">
</TextView>
</TableRow>
</TableLayout>
<TableLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1">
<TableRow>
<TextView
android:layout_width="wrap_content"
android:layout_height="50dip"
android:text="Happy Vendor"
android:background="#000">
</TextView>
</TableRow>
<TableRow>
<TextView
android:layout_width="wrap_content"
android:layout_height="50dip"
android:text="Happy Vendor2"
android:background="#CCC">
</TextView>
</TableRow>
</TableLayout>
</LinearLayout>
我只是尝试使用 textview 来简化它。提前致谢。
【问题讨论】:
标签: android android-linearlayout tablelayout