How do I add a newline to a TextView in Android?

Posted by Pentium10 on Stack Overflow See other posts from Stack Overflow or by Pentium10
Published on 2010-05-15T15:17:44Z Indexed on 2010/05/15 15:24 UTC
Read the original article Hit count: 196

Filed under:
|
|
|

When I define in XML a TextView, how do I add new line to it? \n seams to not work.

<TextView
            android:text="Line1: \n-Line2\n-Line3"
            android:id="@+id/txtTitlevalue"
            android:layout_width="54dip"
            android:layout_height="fill_parent"
            android:textSize="11px"
           ></TextView>

© Stack Overflow or respective owner

Related posts about android

Related posts about android-sdk