TableLayout 实现布局自动拉伸宽度
<TableLayout android:layout_width="match_parent"
android:layout_height="match_parent"
android:stretchColumns="*">
</TableLayout>
设置android:stretchColumns="*"或者根据需要设置
如:android:stretchColumns="0,1,2,3" 设置四个表格都根据需要拉伸宽度。
LinearLayout中元素按比例分配宽度
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:text="时区"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.5