1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-11-23 12:51:16 +00:00

Fixed string formatting warnings.

This commit is contained in:
Felix Ableitner 2016-02-08 21:54:55 +01:00
parent 3779b311fd
commit 5733d95fa5
3 changed files with 8 additions and 4 deletions

View file

@ -69,8 +69,8 @@ public class DevicesAdapter extends ArrayAdapter<RestApi.Device>
upload.setText(RestApi.readableTransferRate(getContext(), conn.outBits));
}
else {
download.setText("0 " + r.getStringArray(R.array.transfer_rate_units)[0]);
upload.setText("0 " + r.getStringArray(R.array.transfer_rate_units)[0]);
download.setText(RestApi.readableTransferRate(getContext(), 0));
upload.setText(RestApi.readableTransferRate(getContext(), 0));
status.setText(r.getString(R.string.device_disconnected));
status.setTextColor(r.getColor(R.color.text_red));
}

View file

@ -68,8 +68,9 @@ public class FoldersAdapter extends ArrayAdapter<RestApi.Folder>
items.setText(getContext()
.getString(R.string.files, model.inSyncFiles, model.globalFiles));
size.setVisibility(VISIBLE);
size.setText(readableFileSize(getContext(), model.inSyncBytes) + " / " +
readableFileSize(getContext(), model.globalBytes));
size.setText(getContext().getString(R.string.folder_size_format,
readableFileSize(getContext(), model.inSyncBytes),
readableFileSize(getContext(), model.globalBytes)));
if (TextUtils.isEmpty(folder.invalid)) {
setTextOrHide(invalid, model.invalid);
}

View file

@ -463,4 +463,7 @@ Please report any problems you encounter via Github.</string>
<string name="state_error">Error</string>
<string name="state_unknown">Unknown</string>
<!-- Format string for folder size, eg "500 MiB / 1 GiB" -->
<string name="folder_size_format">%1$s / %2$s</string>
</resources>