Skip to content Skip to sidebar Skip to footer

Textview That Doesn't Show Full Text

I'm creating a simple layout with a TableLayout and TableRow, that contain two TextViews. This is a part of code.

Solution 1:

Try out the update XML what have you given in question...may be this is what you wanted to do.

<TableLayoutxmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="match_parent"android:layout_height="wrap_content" ><TableRowandroid:id="@+id/myTableRow" ><TextViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:padding="15dip"android:text="Short description" /><TextViewandroid:id="@+id/textView1"android:layout_width="0dip"android:layout_height="wrap_content"android:layout_weight="1"android:padding="15dip"android:text="Large description" /></TableRow></TableLayout>

Solution 2:

to display multiple lines add :

android:ellipsize="none" //the text is not cut on textview width:

android:scrollHorizontally="false"//the text wraps on as many lines as necessary: 

Post a Comment for "Textview That Doesn't Show Full Text"