When I define a TextView
in xml
, how do I add a new line to it? \n
seems not to work.
<TextView
android:id="@+id/txtTitlevalue"
android:text="Line1: \n-Line2\n-Line3"
android:layout_width="54dip"
android:layout_height="fill_parent"
android:textSize="11px" />
Don't trust the Visual editor. Your code does work in the emu.