Skip to content

Commit

Permalink
优化电池控件 电池容量数据的显示位置为居中显示
Browse files Browse the repository at this point in the history
  • Loading branch information
uni7corn committed Dec 9, 2017
1 parent 1c2c5be commit 98db4eb
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,8 @@ private void drawPercentText(Canvas canvas) {
} else {
mTextPaint.setColor(Color.WHITE);
}
canvas.drawText(FormatTextPower(mCurrentBattery), mBatteryAhWidth * 0.5f,
canvas.drawText(FormatTextPower(mCurrentBattery), mBatteryAhWidth * 0.5f + (mTextBounds
.width() >> 2),
mCenterY + (mTextBounds.height() >> 1), mTextPaint);
}

Expand Down

0 comments on commit 98db4eb

Please sign in to comment.