java - Wrap text in Paint (Android) -


I am using the paint function and I am setting the text with the settext method. The problem is that if the text is too big (too many words) the text goes out of the parent, how do I fix it? Maybe wrap when text is bigger than parents. I use this code (for the moment)

  mSubtitlePaint.setTextSize (17); MSubtitlePaint.setStyle (Style.FILL); MSubtitlePaint.setAntiAlias ​​(true); MSubtitlePaint.setTypeface (typeface.crt ("roboto-thin", typeface.edeed));  

For this time I'm setting the text size instead of 20 but I look for a better solution. Thanks in advance.


Comments