This file contains 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
/** | |
* 裁剪文本 | |
*/ | |
private static String cutText(float textSize, String title, float maxWidth) { | |
final TextPaint textPaint = new TextPaint(); | |
textPaint.setTextSize(textSize); | |
if (textPaint.measureText(title) < maxWidth) | |
return title; |
NewerOlder