yixiaolunhui / AndroidMarqueeView

跑马灯
206 stars 43 forks source link

文字居中bug #4

Open LPC351710 opened 7 years ago

LPC351710 commented 7 years ago

BaseLine的Y坐标如果这样计算centeYLine + dip2px(getContext(), textHeight) / 2 会导致问题偏上一点点. 应该这样计算 centeYLine + ((fontMetrics.bottom - fontMetrics.top) / 2 - fontMetrics.bottom)