From 9efae4002ea7dabb30d9b647ee5257b15881e222 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=80=20?= =?UTF-8?q?=D0=97=D0=B0=D1=86=D0=B5=D0=BF=D0=B8=D0=BD?= Date: Thu, 19 Oct 2017 18:56:42 +0300 Subject: [PATCH] [android] Centered '-' in rating view --- android/src/com/mapswithme/maps/widget/RatingView.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/android/src/com/mapswithme/maps/widget/RatingView.java b/android/src/com/mapswithme/maps/widget/RatingView.java index d58c8fafe6..3c4d3c084e 100644 --- a/android/src/com/mapswithme/maps/widget/RatingView.java +++ b/android/src/com/mapswithme/maps/widget/RatingView.java @@ -130,9 +130,8 @@ public class RatingView extends View if (mRating != null) { - float yPos = getHeight() / 2; - yPos += (Math.abs(mTextBounds.height())) / 2; - float xPos = mDrawable != null ? mDrawable.getBounds().right + getPaddingLeft() + int yPos = (int) ((canvas.getHeight() / 2) - ((mTextPaint.descent() + mTextPaint.ascent()) / 2)) ; + int xPos = mDrawable != null ? mDrawable.getBounds().right + getPaddingLeft() : getPaddingLeft(); canvas.drawText(mRating, xPos, yPos, mTextPaint); }