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");