Merge "Translate text by top" into rvc-dev am: 9d3b2a446e am: 7a69c08004 am: fc36319458 am: 5b35f9dcca

Change-Id: I7b0c5b90521a0bd3212542629dcbbbb5516bedda
This commit is contained in:
Lucas Dupin
2020-04-22 19:30:14 +00:00
committed by Automerger Merge Worker

View File

@@ -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);