由于某种原因,我遇到了麻烦......带有“名称”的列不应该占用尽可能多的空间。该列不换行文本。下面的设置是我一直在使用的,它以前也有效。我错过了什么?Eclipse有什么问题吗?
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fadingEdgeLength="100dp">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TableLayout
android:id="@+id/tableLayout1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#333333"
android:stretchColumns="*">
<TableRow android:layout_margin="1dp" android:background="#333333" android:gravity="center">
<TextView
android:gravity="center"
android:padding="3dip"
android:text="Friends"
android:textColor="#000000"
android:textSize="22dp" />
</TableRow>
<TableRow android:layout_margin="1dp" android:background="#000000">
<TextView
android:gravity="left"
android:padding="3dip"
android:text="Name"
android:textColor="#ffffff"
android:textSize="15dp" />
<TextView
android:gravity="left"
android:padding="3dip"
android:text="Address"
android:textColor="#66cccc"
android:textSize="15dp" />
<TextView
android:gravity="left"
android:padding="3dip"
android:text="Interests"
android:textColor="#006666"
android:textSize="15dp" />
</TableRow>
<TableRow android:layout_margin="1dp" android:background="#000000">
<TextView
android:gravity="left"
android:padding="3dip"
android:text="This is short"
android:textColor="#ffffff"
android:textSize="13dp"
android:width="0dip"
android:layout_width="wrap_content"
android:layout_height="match_parent"/>
<TextView
android:gravity="left"
android:padding="3dip"
android:text="This is some text that might be too long and might need to wrap to the next line."
android:textColor="#cc0033"
android:textSize="13dp"
android:width="0dip"
android:layout_height="match_parent"
android:background="#222222" />
<TextView
android:gravity="left"
android:padding="3dip"
android:text="This is some text that will be long so it needs to wrap and go to the next line blah blah blah."
android:textColor="#99cc00"
android:textSize="13dp"
android:width="0dip"
android:layout_height="match_parent" />
</TableRow>
</TableLayout>
</LinearLayout>
</ScrollView>