int transY = bottom - b.getBounds().bottom; if (mVerticalAlignment == ALIGN_BOTTOM) { transY = bottom; } else { // mVerticalAlignment == ALIGN_BASELINE transY = y; } transY -= b.getBounds().bottom;