0

I'm using Drafty formatting for displaying Quoted messages enter image description here

If I write long message instead of 'quoted text' (in the picture), it doesn't display as single line and with dots.

How can I display it like this: enter image description here

Kuvonchbek Yakubov
  • 558
  • 1
  • 6
  • 16
  • Hi, have you find a solution to this? I am thinking about comparing TextView's width with text's measured width from TextPaint. What did you use? – rupinderjeet Nov 30 '20 at 04:20
  • Hi, no I have not found a solution, but I could use another view for quoted messages. For example, `normal_message_cell.xml`, `quoted_message_cell.xml`, `audio_message_cell.xml` and so on. – Kuvonchbek Yakubov Dec 01 '20 at 08:56

2 Answers2

0

Can you show me the XML file of the design?

for now i can assume that you have set constraints of your Quoted message with above title.

-> you can remove the constraint and set it free to expand its width, hope it will help you.

Thank you.

0

In the layout definition of TextView,

<TextView
   ... Rest of your stuff
   android:lines="1"  // or 2 (if the name and message are part of the same view)
   android:ellipsize="end"/>
Froyo
  • 17,947
  • 8
  • 45
  • 73