fbritop Well-Known Member Licensed User Longtime User Oct 9, 2019 #1 I´m using the MeasureText from B4XCanvas. As it gives you the correct height, the problem goes that Android add som extra padding on top and below the label, so when you adjust the label height, the padding makes imposible to see the label fit right. I have try with label padding directly and with JavaObject, with no luck. Is there a way to avoid this "auto" padding? Thanks FBP
I´m using the MeasureText from B4XCanvas. As it gives you the correct height, the problem goes that Android add som extra padding on top and below the label, so when you adjust the label height, the padding makes imposible to see the label fit right. I have try with label padding directly and with JavaObject, with no luck. Is there a way to avoid this "auto" padding? Thanks FBP
Erel B4X founder Staff member Licensed User Longtime User Oct 10, 2019 #2 The code in this example shows how to accurately draw text: https://www.b4x.com/android/forum/threads/b4x-xui-accurate-text-measurement-and-drawing.92810/ You can draw the text instead of using labels. Upvote 0
The code in this example shows how to accurately draw text: https://www.b4x.com/android/forum/threads/b4x-xui-accurate-text-measurement-and-drawing.92810/ You can draw the text instead of using labels.