Loading core/java/android/text/style/BulletSpan.java +8 −11 Original line number Diff line number Diff line Loading @@ -110,19 +110,16 @@ public class BulletSpan implements LeadingMarginSpan, ParcelableSpan { p.setStyle(Paint.Style.FILL); if (l != null) { // "bottom" position might include extra space as a result of line spacing // configuration. Subtract extra space in order to show bullet in the vertical // center of characters. final int line = l.getLineForOffset(start); final float y; if (line == l.getLineCount() - 1) { // line spacing values are not added to last line, vertical center is top+bottom/2 y = (top + bottom) / 2f; } else { // line spacing values are added to the lines other than last line, remove added // empty line spacing to calculate vertical center final float lineHeight = (top - bottom - l.getSpacingAdd()) / l.getSpacingMultiplier(); y = top - lineHeight / 2f; bottom = bottom - l.getLineExtra(line); } final float y = (top + bottom) / 2f; if (c.isHardwareAccelerated()) { if (sBulletPath == null) { sBulletPath = new Path(); Loading Loading
core/java/android/text/style/BulletSpan.java +8 −11 Original line number Diff line number Diff line Loading @@ -110,19 +110,16 @@ public class BulletSpan implements LeadingMarginSpan, ParcelableSpan { p.setStyle(Paint.Style.FILL); if (l != null) { // "bottom" position might include extra space as a result of line spacing // configuration. Subtract extra space in order to show bullet in the vertical // center of characters. final int line = l.getLineForOffset(start); final float y; if (line == l.getLineCount() - 1) { // line spacing values are not added to last line, vertical center is top+bottom/2 y = (top + bottom) / 2f; } else { // line spacing values are added to the lines other than last line, remove added // empty line spacing to calculate vertical center final float lineHeight = (top - bottom - l.getSpacingAdd()) / l.getSpacingMultiplier(); y = top - lineHeight / 2f; bottom = bottom - l.getLineExtra(line); } final float y = (top + bottom) / 2f; if (c.isHardwareAccelerated()) { if (sBulletPath == null) { sBulletPath = new Path(); Loading