The attached image shows the desired end result of how you would like to submit a series of items that are part of a CustomListView.
Each item consists of 3 labels: the first is normal, the second is with bold font and the third contains a text very very long.
I would like this text to be truncated to the third row and to the right point (between 2 words, or at a punctuation mark) and was followed by three or four dots blacks ("....")
Photoshopped image is in the red because I wanted to highlight the salient point of this problem.
I made some attempt that uses the Canvas
but it is very slow (the items can also be numerous, 200-300) and in any case takes into account only the first line of the 3 that make up the label No. 3
I also tried with
but I did not get an acceptable result.
Thanks in advance
Each item consists of 3 labels: the first is normal, the second is with bold font and the third contains a text very very long.
I would like this text to be truncated to the third row and to the right point (between 2 words, or at a punctuation mark) and was followed by three or four dots blacks ("....")
Photoshopped image is in the red because I wanted to highlight the salient point of this problem.
I made some attempt that uses the Canvas
B4X:
w=Canvas1.MeasureStringWidth(str,Typeface.DEFAULT, 11)
I also tried with
B4X:
StringUtils.MeasureMultilineTextHeight (lbl, text)
Thanks in advance