1
Size: a a a
1
MG
MG
DG
MG
MG
TextView
by a factor of 10 o.oandroid.text.StaticLayout.generatemeanwhile i take ~220ms to do line breaking
android.graphics.text.LineBreaker.computeLineBreaks
android.graphics.text.LineBreaker.nComputeLineBreaks
2.29s
DG
MG
MG
MG
MG
setTextSize(30.0f);
)MG
MG
mRes = getResources();
mTextBookPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG);
mTextBookPaint.density = mRes.getDisplayMetrics().density;
mBackgroundPaint = new Paint();
mBackgroundPaint.setColor(Color.WHITE);
mBackgroundPaint.setStyle(Paint.Style.FILL);
MG
textBookView.setBreakStrategy(LineBreaker.BREAK_STRATEGY_SIMPLE);
it still takes over 2 secondsMG
nComputeLineBreaks
is doing that takes it over 2 seconds to completeMG
MG
MG
MG