Note that there are some explanatory texts on larger screens.

plurals
  1. POText in TextView not shown in multiple lines - it gets truncated in a single line
    primarykey
    data
    text
    <p>Below is an outline of my layout. I have my ScrollView inside another LinearLayout because I would be adding more views to it in runtime. </p> <p>Anyway, the problem is - the text in the TextView is always truncated to a single line, and is never shown in multiple lines. </p> <p>Is there any way to make it display a multilined TextViw without having to set an arbitrary number of lines using android:lines or android:maxLines?</p> <p>Thanks.</p> <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:background="@drawable/background" android:id="@+id/XyzLayout" android:paddingRight="10dp"&gt; &lt;ScrollView android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/background" android:fillViewport="true"&gt; &lt;LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" android:layout_marginBottom="0dip" android:layout_marginTop="1dip"&gt; &lt;TextView android:id="@+id/textView1" android:text="@string/String1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="10dip" android:layout_marginTop="20dip" android:layout_marginRight="10dip" android:textSize="18dip" android:typeface="sans" android:textStyle="bold" android:layout_marginBottom="4dip" android:inputType="text|textMultiLine"/&gt; &lt;TextView android:id="@+id/textView2" android:text="@string/String2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="10dip" android:layout_marginTop="20dip" android:layout_marginRight="10dip" android:textSize="16sp" android:typeface="sans" android:textStyle="bold" android:layout_marginBottom="4dip" android:inputType="text|textMultiLine"/&gt; &lt;/LinearLayout&gt; &lt;/ScrollView&gt; &lt;/LinearLayout&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload