From d33a46c77d1dc7baea6b132aa58164b7b7ab83e7 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Wed, 26 Oct 2016 20:28:11 +0200 Subject: disable printing letters on tiles --- .../eu/siacs/conversations/services/AvatarService.java | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/services/AvatarService.java b/src/main/java/eu/siacs/conversations/services/AvatarService.java index 45a6fd81..707a5756 100644 --- a/src/main/java/eu/siacs/conversations/services/AvatarService.java +++ b/src/main/java/eu/siacs/conversations/services/AvatarService.java @@ -318,18 +318,16 @@ public class AvatarService implements OnAdvancedStreamFeaturesLoaded { letter = letter.toUpperCase(Locale.getDefault()); Paint tilePaint = new Paint(), textPaint = new Paint(); tilePaint.setColor(tileColor); - textPaint.setFlags(Paint.ANTI_ALIAS_FLAG); - textPaint.setColor(FG_COLOR); - textPaint.setTypeface(Typeface.create("sans-serif-light", - Typeface.NORMAL)); - textPaint.setTextSize((float) ((right - left) * 0.8)); + //textPaint.setFlags(Paint.ANTI_ALIAS_FLAG); + //textPaint.setColor(FG_COLOR); + //textPaint.setTypeface(Typeface.create("sans-serif-light",Typeface.NORMAL)); + //textPaint.setTextSize((float) ((right - left) * 0.8)); Rect rect = new Rect(); canvas.drawRect(new Rect(left, top, right, bottom), tilePaint); - textPaint.getTextBounds(letter, 0, 1, rect); - float width = textPaint.measureText(letter); - canvas.drawText(letter, (right + left) / 2 - width / 2, (top + bottom) - / 2 + rect.height() / 2, textPaint); + //textPaint.getTextBounds(letter, 0, 1, rect); + //float width = textPaint.measureText(letter); + //canvas.drawText(letter, (right + left) / 2 - width / 2, (top + bottom) / 2 + rect.height() / 2, textPaint); return true; } -- cgit v1.2.3