2018/02

Android/Development Tips

Measuring of String in android

Paint p = new Paint(); Rect bounds = new Rect(); p.getTextBounds(labelString, 0, labelString.length(), bounds); float height = p.measureText(labelString); int width = bounds.width();

Nanamare
'2018/02 글 목록