Greum
Well-Known Member
I have the following statement
textView9.setText("Sale price: " + String.format("%.0f", salePrice) + " " + saleHold);
but it gives a warning
Do not concatenate text displayed with setText. Use resource string with placeholders.
I understand using a resource string for the "Sale price" part but I'm not sure how a placeholder would help here.
I'm also not sure of the best way to convert a float to a string removing the decimal part in the process. I have read conflicting methods. I would also like to add a thousands separator.
textView9.setText("Sale price: " + String.format("%.0f", salePrice) + " " + saleHold);
but it gives a warning
Do not concatenate text displayed with setText. Use resource string with placeholders.
I understand using a resource string for the "Sale price" part but I'm not sure how a placeholder would help here.
I'm also not sure of the best way to convert a float to a string removing the decimal part in the process. I have read conflicting methods. I would also like to add a thousands separator.