Reputation: 3
Now I need use the text to fit my requirement. How to set the text to let the text show several in first line and then auto show the left characters in the second line.I do not want to insert the characters "\n" to my text.
Upvotes: 0
Views: 114
Reputation: 1156
There is an option called TextOption() to place text in alignment.Based on that you can adjust text field as per your requirement.See the below Example code:
Text mScore = new Text(CAMERA_WIDTH - 175, 45, mScoreFont,"XXXXXX", "XXXXXX".length(),new TextOptions(HorizontalAlign.RIGHT),this.getVertexBufferObjectManager());
Upvotes: 1