use string with placeholders

This commit is contained in:
VishnuSanal
2022-11-05 13:21:35 +05:30
parent 134a217aad
commit 090fd9fb16
2 changed files with 2 additions and 4 deletions
@@ -1074,9 +1074,7 @@ public class Drawer implements NavigationView.OnNavigationItemSelectedListener {
private SpannableString getSpannableText(String text, String freeSpace, String totalSpace) {
String s =
String.format(
"%s\n%s %s %s", text, freeSpace, mainActivity.getString(R.string.free_of), totalSpace);
String s = mainActivity.getString(R.string.free_of, text, freeSpace, totalSpace);
SpannableString spannableString = new SpannableString(s);
+1 -1
View File
@@ -789,6 +789,6 @@ You only need to do this once, until the next time you select a new location for
<string name="protocol_ftp" translatable="false">FTP</string>
<string name="protocol_ftps">Secure FTP</string>
<string name="unavailable">Unavailable</string>
<string name="free_of">"free of</string>
<string name="free_of">"%s\n%s free of %s</string>
</resources>