Skip to content

Commit

Permalink
merage
Browse files Browse the repository at this point in the history
  • Loading branch information
Moosphan committed Sep 10, 2018
2 parents 28622e6 + ebf1dd2 commit b472d0e
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,10 @@ private void drawProgressText(Canvas canvas){
mTextPaint.setColor(mProgressTextColor);
mTextPaint.setTextAlign(Paint.Align.CENTER);

String progressText = ((int) moveProgress)+ "%";
canvas.drawText(progressText, (getWidth() - getPaddingLeft())/2 , (getHeight() - getPaddingTop())/2, mTextPaint);
String progressText = ((int) moveProgress) + "%";
float x = (getWidth() + getPaddingLeft() - getPaddingRight()) / 2;
float y = (getHeight() + getPaddingTop() - getPaddingBottom() - (mTextPaint.descent() + mTextPaint.ascent())) / 2;
canvas.drawText(progressText, x , y, mTextPaint);

}

Expand Down

0 comments on commit b472d0e

Please sign in to comment.