This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static int getTextHeight(String text, int maxWidth, float textSize, Typeface typeface) { | |
| TextPaint paint = new TextPaint(Paint.ANTI_ALIAS_FLAG | Paint.SUBPIXEL_TEXT_FLAG); | |
| paint.setTextSize(textSize); | |
| paint.setTypeface(typeface); | |
| int lineCount = 0; | |
| int index = 0; | |
| int length = text.length(); |