diff --git a/magicindicator/src/main/java/net/lucode/hackware/magicindicator/buildins/commonnavigator/titles/ClipPagerTitleView.java b/magicindicator/src/main/java/net/lucode/hackware/magicindicator/buildins/commonnavigator/titles/ClipPagerTitleView.java index 12984992..83832dd1 100644 --- a/magicindicator/src/main/java/net/lucode/hackware/magicindicator/buildins/commonnavigator/titles/ClipPagerTitleView.java +++ b/magicindicator/src/main/java/net/lucode/hackware/magicindicator/buildins/commonnavigator/titles/ClipPagerTitleView.java @@ -82,7 +82,8 @@ private int measureHeight(int heightMeasureSpec) { @Override protected void onDraw(Canvas canvas) { int x = (getWidth() - mTextBounds.width()) / 2; - int y = (getHeight() + mTextBounds.height()) / 2; + Paint.FontMetrics fontMetrics = mPaint.getFontMetrics(); + int y = (int) (getHeight() / 2 - fontMetrics.bottom / 2 - fontMetrics.top / 2); // 画底层 mPaint.setColor(mTextColor);