Translate text by top
We were centralizing without considering that there could be some additional translation passed to DynamicDrawableSpan#draw Test: atest DynamicDrawableSpanTest Fixes: 154489406 Change-Id: I9615f478d1962b2d6fd54123fc391554073f5bf1
This commit is contained in:
@@ -166,7 +166,7 @@ public abstract class DynamicDrawableSpan extends ReplacementSpan {
|
||||
if (mVerticalAlignment == ALIGN_BASELINE) {
|
||||
transY -= paint.getFontMetricsInt().descent;
|
||||
} else if (mVerticalAlignment == ALIGN_CENTER) {
|
||||
transY = (bottom - top) / 2 - b.getBounds().height() / 2;
|
||||
transY = top + (bottom - top) / 2 - b.getBounds().height() / 2;
|
||||
}
|
||||
|
||||
canvas.translate(x, transY);
|
||||
|
||||
Reference in New Issue
Block a user