Do you want to display different texts in the same text form? if so, use two text views, for example:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/hello_world" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/hello_world" /> </LinearLayout>
Remote android: inputType = "textMultiLine", this is an attribute of EditText.
If you just want to use more than one line in the same text form:
android:maxLines="5"//optional to set max numbers of lines android:minLines="2"//optional to set min numbers of lines android:singleLine="false"//set false to allow multiple line android:lines="2" //or more
If this text view that you want to use belongs to the ListView, simply use:
android.R.layout.simple_list_item_2
This will give you two texts to work on.
source share