unread badge: show >999 as infinity symbol

This commit is contained in:
Daniel Gultsch 2017-04-05 18:39:27 +02:00
parent 081c33b886
commit f75eb6bc43
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@ public class UnreadCountCustomView extends View {
float textOffset = canvas.getWidth() / 6.0f;
textPaint.setTextSize(0.95f * radius);
canvas.drawCircle(midx, midy, radius * 0.94f, paint);
canvas.drawText(String.valueOf(unreadCount), midx, midy + textOffset, textPaint);
canvas.drawText(unreadCount > 999 ? "\u221E" : String.valueOf(unreadCount), midx, midy + textOffset, textPaint);
}