Rect rect= new Rect();
Paint textPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
textPaint.setTextAligh(Paint.Align.Right);
textPaint.setTextSize(12);
textPaint.getTextBounds("ABC", 0, "ABC".length(),rect);
int textHeight = rect.height();
int textWidth = textPaint.measureText("ABC");

 

posted on 2015-06-04 00:06  猿类的进化史  阅读(898)  评论(0编辑  收藏  举报