Changing line height of a Label

Inman

Well-Known Member
Licensed User
Longtime User
I want to increase the line height or the spacing between each line of text inside a label. I checked B4A and couldn't find any methods to accomplish this.

So next I checked the official Android documentation of TextView and found something called setLineSpacing

public void setLineSpacing (float add, float mult)

Sets line spacing for this TextView. Each line will have its height multiplied by mult and have add added to it.

I then tried to set this value using Reflection library

B4X:
Reflect.Target=lblstory
Reflect.RunMethod("setLineSpacing(1,2)")

When executing, I get NoSuchMethodException. What could be wrong?
 

Inman

Well-Known Member
Licensed User
Longtime User
So that's how you pass arguments when using Reflection library. Thank you very much for the info.
 
Upvote 0
Top