游戏评分徽章入口图标优化

This commit is contained in:
张玉久
2019-11-28 16:47:38 +08:00
parent 92b5e28675
commit 7bba3f8b4d
3 changed files with 102 additions and 95 deletions

View File

@ -43,10 +43,12 @@ public class CenterImageSpan extends ImageSpan {
float x, int top, int y, int bottom, Paint paint) {
Drawable b = getDrawable();
canvas.save();
int transY = 0;
int transY;
transY = ((bottom - top) - b.getBounds().bottom) / 2 + top;
canvas.translate(x, transY);
b.draw(canvas);
if (b.isVisible()) {
b.draw(canvas);
}
canvas.restore();
}