Skip to content
Snippets Groups Projects
Verified Commit bb1bce23 authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Use sizes from AOSP LetterTileDrawable instead

parent fc192610
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -114,7 +114,7 @@ public class TextDrawable extends ShapeDrawable {
// draw text
int width = this.width < 0 ? r.width() : this.width;
int height = this.height < 0 ? r.height() : this.height;
int fontSize = this.fontSize < 0 ? (Math.min(width, height) / 2) : this.fontSize;
int fontSize = this.fontSize < 0 ? (int) (Math.min(width, height) * 0.67) : this.fontSize;
textPaint.setTextSize(fontSize);
canvas.drawText(text, width / 2, height / 2 - ((textPaint.descent() + textPaint.ascent()) / 2), textPaint);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment