How to measure bounds of space in android?
I mean, the following:
Rect bounds = new Rect();
paint.getTextBounds(String.valueOf(' '), 0, 1, bounds);
return bounds.width();
returns 0.
The solution is to use paint.measureText(String.valueOf(' '))
instead.
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