1
String text = "Android"; Rect rect = new Rect(); mPaint.getTextBounds(text, 0, text.length(), rect); int width = rect.width();//文本的宽度 int height = rect.height();//文本的高度
1
String text = "Android"; Rect rect = new Rect(); mPaint.getTextBounds(text, 0, text.length(), rect); int width = rect.width();//文本的宽度 int height = rect.height();//文本的高度