I did like below in xml
<TableRow>
<TextView android:id="@+id/address1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="left"
android:maxLines="4"
android:singleLine="false"
android:text="Johar Mor, Gulistan-e-Johar, Karachi" >
</TextView>
</TableRow>
It is not working for multiline, and I am using TableLayout…
so what is mistake I am doing here?
If the text you’re putting in the
TextViewis short, it will not automatically expand to four lines. If you want theTextViewto always have four lines regardless of the length of the text in it, set theandroid:linesattribute:You can do this with TableRow, see below code