Creating table Android
<TableLayout android:layout_width="match_parent" android:id="@+id/tableLayout1" android:layout_height="wrap_content" android:stretchColumns="1">
<TableRow android:id="@+id/tableRow1" android:layout_width="wrap_content" android:layout_height="wrap_content">
<TextView android:text="my name is Tarzan and i lives in Amazon Jungle.开发者_如何学C I want an android phone." android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content"></TextView>
<TextView android:text="my name is Mowgly and i lives in Amazon Jungle. I want an android phone." android:id="@+id/textView2" android:layout_width="wrap_content" android:layout_height="wrap_content"></TextView>
</TableRow>
I have a table with two columns and I put TextViews in both.. I stretch the second column.. but, when I set the long text in both TextViews, the table stretch over the limit of phone so I can't see that.. it just same if I set the table layout with android:layout_width="fill_parent"
.. what should I do?
android:maxWidth="100dip"
.. add such a tag in your textView..
精彩评论