Susu,
Have you tried adjusting the MeasureMultilineTextHeight by the proportions that you have adjusted the line spacing by?
Might just be a simple solution?
Are you kidding? If I know how to create a library, I didn't ask you that question
However, I solved it by my way:
B4X:
' MeasureLabel : Fake label to measure the height of text. Set it visible = False
' txt : String that contain the text.
' RLabel : This label you really want to display
rowheight = su.MeasureMultilineTextHeight(MeasureLabel, txt)
Obj1.Target = RLabel
before = Obj1.RunMethod("getLineHeight") 'Get the height of line BEFORE you change it
Obj1.Target = RLabel
Obj1.RunMethod3("setLineSpacing", 0, "java.lang.float", 1.5, "java.lang.float") 'Change the space between lines
Obj1.Target = RLabel
after = Obj1.RunMethod("getLineHeight") 'Get the height of line AFTER you change it
finalheight = ((after * rowheight)/before) + 20dip 'Add 20dip to have some space below the text.
This way maybe not the best but at least it worked for me.