android - Multiple TextViews in a LinearLayout, Last TextView should start with a new line when text goes beyond screen width -


i have 3 textviews in linearlayout. want last textview appear in new line (from left side) when text goes out of bound of screen width.

below xml code

<relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/topcontainer" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginbottom="@dimen/general_padding" android:gravity="center_vertical">   <linearlayout     android:layout_width="match_parent"     android:layout_height="wrap_content"     android:layout_centervertical="true">      <textview         android:id="@+id/objectnametv"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:text="will smith "         android:singleline="true"         android:ellipsize="none"         android:textappearance="?android:attr/textappearancemedium"         android:textcolor="@color/orange_app_color" />      <textview         android:id="@+id/postdetailtv"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:text="is following "         android:singleline="true"         android:textappearance="?android:attr/textappearancesmall" />      <textview         android:id="@+id/subjectnametv"         android:layout_width="fill_parent"         android:layout_height="wrap_content"         android:text="kia kool hain hum"         android:singleline="true"         android:maxlines="2"         android:scrollhorizontally="false"         android:textappearance="?android:attr/textappearancemedium"         android:textcolor="@color/orange_app_color" />  </linearlayout> </relativelayout> 

xml layout screen shot

thanks

you can't xml programatically using 1 textview. hope post you: different font size of strings in same textview


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -