0
독자를 씁니다. 내 페이지의 텍스트를 올바르게 표시하려면 표시 할 수있는 문자 수는 얼마인지 알아야합니다.StaticLayout 표시 문자 수를 받으십시오.
TextPaint mTextPaint=new TextPaint();
mTextPaint.setTextSize(16);
StaticLayout mTextLayout = new StaticLayout(newText, mTextPaint, canvas.getWidth() - 20, Alignment.ALIGN_NORMAL, 1.5f, 0.0f, false);
canvas.save();
int x = 10, y = 50;
y += p.ascent() + p.descent();
canvas.translate(x, y);
mTextLayout.draw(canvas);
canvas.restore();
감사합니다 당신은 나에게 많은 도움이! –