Use fallback linespacing in ChartSweepView and ChartGridView

Bug: 28963299
Test: none
Change-Id: I249a3795fcbfbef14eac11b72220bb92f9690de6
This commit is contained in:
Roozbeh Pournader
2017-08-22 16:54:27 -07:00
parent 897f396b16
commit a7f6bb54c8
2 changed files with 9 additions and 5 deletions

View File

@@ -170,8 +170,9 @@ public class ChartGridView extends View {
paint.setColor(mLabelColor);
paint.setTextSize(mLabelSize);
return new StaticLayout(text, paint,
(int) Math.ceil(Layout.getDesiredWidth(text, paint)),
Layout.Alignment.ALIGN_NORMAL, 1.f, 0, true);
return StaticLayout.Builder.obtain(text, 0, text.length(), paint,
(int) Math.ceil(Layout.getDesiredWidth(text, paint)))
.setUseLineSpacingFromFallbacks(true)
.build();
}
}