标签:pre highlight string width new logs height bottom class
/** * 获取文本的高度 * @param text * @return */ private int getTextHeight(String text){ Rect bounds = new Rect(); mFanPaint.getTextBounds(text,0,text.length(),bounds); int height = bounds.bottom + bounds.height(); return height; } /** * 获取文本的宽度 * @param text * @return */ private int getTextWidth(String text){ Rect bounds = new Rect(); mFanPaint.getTextBounds(text,0,text.length(),bounds); int width = bounds.left + bounds.width(); return width; }
标签:pre highlight string width new logs height bottom class
原文地址:http://www.cnblogs.com/hacjy/p/7412543.html