I have TextView in a FrameLayout. The Textview is aligned to the left bottom of the FrameLayout and has a specific MaxWidht.
It currently looks like this:
Lorem ipsum dolor sit amet, vel et
alia fierent forensibus.
What I want to achieve is this:
Lorem ipsum dolor
sit amet, vel et alia fierent forensibus.
So basically, the text should be splitted by the width of the bottom line, not by the top line.
Is there an easy way to achieve this?
Layout.xml
<FrameLayout
android:id="@+id/flHeader"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="orem ipsum dolor sit amet, vel et alia fierent forensibus."
android:id="@+id/txtHeader"
android:layout_gravity="left|bottom"
android:textColor="#ffffff"
android:layout_below="@id/txtDescriptionShort"
android:maxWidth="400dp" />
</FrameLayout>
Any help is very appreciated!
Thank you in advance.
setText("Lorem ipsum dolor \n sit amet, vel et alia fierent forensibus.");- IntelliJ AmiyaTextViews method of text renderring. - Lamorak