From bc26a92d90e604c6162b781526fab81a577fa09c Mon Sep 17 00:00:00 2001 From: chenzefeng09 <278313012@qq.com> Date: Mon, 13 Apr 2015 20:11:17 +0800 Subject: [PATCH] Update JustifyTextView.java bug fix --- .../java/me/biubiubiu/justifytext/library/JustifyTextView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/justifytext-library/src/main/java/me/biubiubiu/justifytext/library/JustifyTextView.java b/justifytext-library/src/main/java/me/biubiubiu/justifytext/library/JustifyTextView.java index cba24bb..fc8c130 100644 --- a/justifytext-library/src/main/java/me/biubiubiu/justifytext/library/JustifyTextView.java +++ b/justifytext-library/src/main/java/me/biubiubiu/justifytext/library/JustifyTextView.java @@ -62,7 +62,7 @@ private void drawScaledText(Canvas canvas, int lineStart, String line, float lin line = line.substring(3); } - float d = (mViewWidth - lineWidth) / line.length() - 1; + float d = (mViewWidth - lineWidth) / (line.length() - 1); for (int i = 0; i < line.length(); i++) { String c = String.valueOf(line.charAt(i)); float cw = StaticLayout.getDesiredWidth(c, getPaint());