Merge "Translate text by top" into rvc-dev am: 9d3b2a446e am: 7a69c08004 am: fc36319458
Change-Id: I57479d8efd0939ec3f43d35d638f4b99cb39ee35
This commit is contained in:
@@ -166,7 +166,7 @@ public abstract class DynamicDrawableSpan extends ReplacementSpan {
|
|||||||
if (mVerticalAlignment == ALIGN_BASELINE) {
|
if (mVerticalAlignment == ALIGN_BASELINE) {
|
||||||
transY -= paint.getFontMetricsInt().descent;
|
transY -= paint.getFontMetricsInt().descent;
|
||||||
} else if (mVerticalAlignment == ALIGN_CENTER) {
|
} 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);
|
canvas.translate(x, transY);
|
||||||
|
|||||||
Reference in New Issue
Block a user