If I add textWrap="true" to a Label, text is wrapped over several lines, so far so good.
But I have a very long string and our design only have room for two lines. How do I limit the Label to max two lines?
I'd prefer not to set a height, since that would leave an empty line for texts that could fit on one line?
Let's try this:
For Android:
myLabel.android.setMaxLines(2);
For iOS:
myLabel.ios.numberOfLines = 2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With