This is my XML element for the TextView:
<TextView
android:id="@+id/todo_notes"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="3"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
tools:text="This is a long description of what has to be done to make this task complete. It might only be one or two words (if the title is specific enough), or it might be a whole lot more than that." />
It's contained within a vertical LinearLayout (as you might be able to guess from the screenshots).
This is how it looks:
This is how I want it to look:
In short, I want the ellipsis to be at the end of the last line, rather than replacing the last line. How can I make this happen? I'd prefer a solution that doesn't require any Java, but if that's not possible, I'm fine with it.
I'm on Android Studio 3.0.1, looking at it with API 27. I can reproduce this error by just copy-and-pasting the <TextView>
into a blank (aside from the <?xml>
header) file, with a narrow enough screen size that the text wraps onto more than three lines.