detail: improve track number handling

Improve the way track numbers are handled in the album detail view.

Previously, Auxio would show track numbers by simplying stringifying
the integer and then showing it in a TextView. This was problematic for
two reasons:
- Numerics from other languages like Arabic would not be respected
- Invalid track numbers [e.g 0] would be shown regardless of the
situation.

This commit fixes that by placing all track numbers through a format
string first, and showing a generic song icon instead of a number
whenever the track number is 0.
This commit is contained in:
OxygenCobalt
2022-02-06 11:19:50 -07:00
parent 4b919b121a
commit 8e0d27696d
4 changed files with 29 additions and 3 deletions
@@ -7,4 +7,5 @@
<string name="fmt_two" translatable="false">%1$s • %2$s</string>
<string name="fmt_three" translatable="false">%1$s • %2$s • %3$s</string>
<string name="fmt_counts" translatable="false">%1$s, %2$s</string>
<string name="fmt_track" translatable="false">%d</string>
</resources>
+1
View File
@@ -145,6 +145,7 @@
<string name="def_artist">Unknown Artist</string>
<string name="def_genre">Unknown Genre</string>
<string name="def_date">No Date</string>
<string name="def_track">No Track Number</string>
<string name="def_playback">No music playing</string>
<string name="def_widget_song">Song Name</string>
<string name="def_widget_artist">Artist Name</string>