Android Studio. White spaces into canvas.drawText are normalized-ThrowExceptions

Exception or error:

In Studio (Android) I use Canvas to drawText, like the following:

    String apuestas = "Hola       que tal?";
    canvas.drawText(apuestas, 100, 210, paint);

The result text in the canvas has all spaces between “hola” and “que” normalized, only one space is remaining. I want to draw all de white spaces inside the String. Any idea?


How to solve:

Leave a Reply

Your email address will not be published. Required fields are marked *