I'm writing an apply that pops texts on the screen and usually it is longer than 1 line. If the last word of a line is too long to fit in it, textview would just put it at the beginning of the next line. Is there a way to modify this behaviour? When the last word is a long one the results are horrible.
Basically I'd like to achieve something like this:
|Lorem ipsum dolor sit amet, consecte|
|tur adipiscing elit. Lorem ipsum dol|
|or sit amet, consectetur adipiscing |
|elit. |
Instead of what I'm getting now:
|Lorem ipsum dolor sit amet, |
|consectetur adipiscing elit. Lorem |
|ipsum dolor sit amet, consectetur |
|adipiscing elit. |
Thank you!
ADDITIONAL INFO
I have this textview that displays random quotes that have different lengths. What I need is a way to split the last word of every line.
I'm looking for a way to do something like this!
Here is the layout xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical" >
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/title" />
<TextView
android:id="@+id/quote"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/quote" />
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="refresh"
android:text="@string/tellmemore" />
Source: View source