I used all possible ways to wrap text in textview but it’s not working. It’s only showing one line and the rest is gone. I’m fetching address from database and assigning it to textview. I tried textview‘s height and width parameters with all possible values but it’s still not working.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/relativeLayout1" android:layout_width="wrap_content" android:layout_height="match_parent" android:gravity="fill_horizontal">
<TextView android:layout_toRightOf="@+id/address"
android:layout_alignTop="@+id/address" android:layout_alignBottom="@+id/address"
android:layout_height="wrap_content"
android:id="@+id/addressans"
android:layout_marginLeft="55dp"
android:inputType="textMultiLine"
android:layout_weight="1"
android:ellipsize="none"
android:singleLine = "false"
android:layout_width="wrap_content">
</TextView>
</RelativeLayout>
That’s coz you specified both
android:layout_alignTop="@+id/address"andandroid:layout_alignBottom="@+id/address". YourTextViewhas no space to stretch. You probably need to removeandroid:layout_alignBottom="@+id/address"attribute to let it stretch to the bottom.