获取android文字的高度
Rect bounds = new Rect();// 矩形
mPaint.getTextBounds(text, 0, text.length(), bounds);
int textHeight = bounds.height();
补充:
Android中文字的绘制是以右下角为起始点的!
Rect bounds = new Rect();// 矩形
mPaint.getTextBounds(text, 0, text.length(), bounds);
int textHeight = bounds.height();
补充:
Android中文字的绘制是以右下角为起始点的!