2

I have a TextView in my layout which has 2 lines and in case the text in it is too long, it should be cut with 3 dots.
The problem is that the 3 dots are not always shown. Sometimes if the text has '\n' in the middle or too many spaces, the 3 dots are not shown and the user can't know that the text is not full.

If you find anything wrong with my xml, please tell me.
Thanks

<TextView
    android:id="@+id/messageText"
    style="@style/bubblesTextStyle"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignLeft="@id/toString"
    android:layout_below="@id/inbox_contactName"
    android:layout_marginTop="-2dp" />

<style name="bubblesTextStyle" parent="@android:style/TextAppearance.Theme">
    <item name="android:ellipsize">end</item>
    <item name="android:maxLines">2</item>
    <item name="android:textColor">#666666</item>
    <item name="android:textSize">12sp</item>
</style>
Yaniv
  • 3,321
  • 8
  • 30
  • 45

0 Answers0