Ami*_*mit 15 android android-widget
我只是尝试使用表格布局来显示一些数据....数据是一个3列数据,我希望列应该利用可用的整个宽度.但似乎我使用的布局XML代码只是根据内容包装列.
布局XML代码
<?xml version="1.0" encoding="utf-8"?>
<TableLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TableRow
android:layout_width="fill_parent">
<TextView
android:padding="3dip"
android:gravity="left"
android:text="Name"
/>
<TextView
android:padding="3dip"
android:gravity="left"
android:text="Address"
/>
<TextView
android:padding="3dip"
android:gravity="left"
android:text="Age"
/>
</TableRow>
</TableLayout>
Run Code Online (Sandbox Code Playgroud)
Com*_*are 31
您可以尝试添加android:stretchColumns="0,1,2"到您的<TableLayout>元素.
| 归档时间: |
|
| 查看次数: |
30696 次 |
| 最近记录: |