diff options
author | steckbrief <steckbrief@chefmail.de> | 2016-03-18 17:13:36 +0100 |
---|---|---|
committer | steckbrief <steckbrief@chefmail.de> | 2016-03-18 17:13:36 +0100 |
commit | f5b684ab6b061cd558bd161c90bcea2b679eb798 (patch) | |
tree | 0abf4656e534f8fcf2b2c9b3b8d65b6943bf0c23 /src/main/java/de/thedevstack/conversationsplus/services/AvatarService.java | |
parent | 74582979b3c97117fd736422f07e007b1373b9a6 (diff) | |
parent | 67586766919f5d531d610a24331c0302311f8911 (diff) |
Merge branch 'master' of git.fucktheforce.de:conversations-plus
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/services/AvatarService.java')
-rw-r--r-- | src/main/java/de/thedevstack/conversationsplus/services/AvatarService.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/services/AvatarService.java b/src/main/java/de/thedevstack/conversationsplus/services/AvatarService.java index 11ff36da..6311d739 100644 --- a/src/main/java/de/thedevstack/conversationsplus/services/AvatarService.java +++ b/src/main/java/de/thedevstack/conversationsplus/services/AvatarService.java @@ -308,8 +308,7 @@ public class AvatarService { } bitmap = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_8888); Canvas canvas = new Canvas(bitmap); - final String trimmedName = name.trim(); - drawTile(canvas, trimmedName, 0, 0, size, size); + drawTile(canvas, name, 0, 0, size, size); ImageUtil.addBitmapToCache(KEY, bitmap); return bitmap; } @@ -382,7 +381,8 @@ public class AvatarService { private boolean drawTile(Canvas canvas, String name, int left, int top, int right, int bottom) { if (name != null) { - final String letter = name.isEmpty() ? "X" : name.substring(0, 1); + String trimmedName = name.trim(); + final String letter = trimmedName.isEmpty() ? "X" : trimmedName.substring(0, 1); final int color = UIHelper.getColorForName(name); drawTile(canvas, letter, color, left, top, right, bottom); return true; |