diff options
author | ByteHamster <info@bytehamster.com> | 2024-01-04 18:27:14 +0100 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2024-01-04 18:58:59 +0100 |
commit | 9eac993e45ae1cf8073bfd65f02cc5272ef808cb (patch) | |
tree | 0c2e69261f03432247d6acac1c6562bb5f1cd7a2 /ui/echo/src | |
parent | c8230b70344468c0a624b21dcfd04749af498bb6 (diff) | |
download | AntennaPod-9eac993e45ae1cf8073bfd65f02cc5272ef808cb.zip |
Center numbers on Echo share screen
Diffstat (limited to 'ui/echo/src')
-rw-r--r-- | ui/echo/src/main/java/de/danoeh/antennapod/ui/echo/screens/FinalShareScreen.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ui/echo/src/main/java/de/danoeh/antennapod/ui/echo/screens/FinalShareScreen.java b/ui/echo/src/main/java/de/danoeh/antennapod/ui/echo/screens/FinalShareScreen.java index fe938ae43..4af8941d0 100644 --- a/ui/echo/src/main/java/de/danoeh/antennapod/ui/echo/screens/FinalShareScreen.java +++ b/ui/echo/src/main/java/de/danoeh/antennapod/ui/echo/screens/FinalShareScreen.java @@ -56,7 +56,6 @@ public class FinalShareScreen extends BubbleScreen { paintTextMain.setTextSize(0.12f * innerBoxSize); canvas.drawText(year, innerBoxX + 0.8f * innerBoxSize, innerBoxY + 0.25f * innerBoxSize, paintTextMain); - paintTextMain.setTextAlign(Paint.Align.LEFT); float fontSizePods = innerBoxSize / 18; // First one only float textY = innerBoxY + 0.62f * innerBoxSize; for (int i = 0; i < favoritePodNames.size(); i++) { @@ -80,10 +79,13 @@ public class FinalShareScreen extends BubbleScreen { canvas.drawText(" ...", pos.left, pos.centerY(), paintTextMain); } + paintTextMain.setTextAlign(Paint.Align.CENTER); paintTextMain.setTextSize(fontSizePods); - canvas.drawText((i + 1) + ".", innerBoxX, textY, paintTextMain); - String ellipsizedTitle = ellipsize(favoritePodNames.get(i), paintTextMain, (1.0f - 0.055f) * innerBoxSize); - canvas.drawText(ellipsizedTitle, innerBoxX + 0.055f * innerBoxSize, textY, paintTextMain); + final float numberWidth = 0.06f * innerBoxSize; + canvas.drawText((i + 1) + ".", innerBoxX + numberWidth / 2, textY, paintTextMain); + paintTextMain.setTextAlign(Paint.Align.LEFT); + String ellipsizedTitle = ellipsize(favoritePodNames.get(i), paintTextMain, innerBoxSize - numberWidth); + canvas.drawText(ellipsizedTitle, innerBoxX + numberWidth, textY, paintTextMain); fontSizePods = innerBoxSize / 24; // Starting with second text is smaller textY += 1.3f * fontSizePods; paintTextMain.setTypeface(typefaceNormal); |