Jack Jack - 1 year ago 87
Android Question

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. 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>

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
.. what should I do?

Answer Source

android:maxWidth="100dip".. add such a tag in your textView..

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download