added str format for resource strings

This commit is contained in:
afischerdev 2023-12-11 10:52:22 +01:00
parent 30d4fbb0b0
commit 1e9783819b

View file

@ -387,7 +387,7 @@ public class BRouterView extends View {
if (size < 1) if (size < 1)
msg = getContext().getString(R.string.msg_no_wpt); msg = getContext().getString(R.string.msg_no_wpt);
if (size > 1000) if (size > 1000)
msg = getContext().getString(R.string.msg_to_much_wpts, size); msg = String.format(getContext().getString(R.string.msg_to_much_wpts), size);
} }
if (msg != null) { if (msg != null) {
@ -718,7 +718,7 @@ public class BRouterView extends View {
((BRouterActivity) getContext()).showErrorMessage(cr.getErrorMessage()); ((BRouterActivity) getContext()).showErrorMessage(cr.getErrorMessage());
} else { } else {
String memstat = memoryClass + "mb pathPeak " + ((cr.getPathPeak() + 500) / 1000) + "k"; String memstat = memoryClass + "mb pathPeak " + ((cr.getPathPeak() + 500) / 1000) + "k";
String result = getContext().getString(R.string.msg_status_result, String result = String.format(getContext().getString(R.string.msg_status_result),
getContext().getString(R.string.app_version), getContext().getString(R.string.app_version),
memstat, memstat,
Double.toString(cr.getDistance() / 1000.), Double.toString(cr.getDistance() / 1000.),