-3

Currently in my strings.xml I have

`<string name="price_string">My string with price: %1$s</string>`

The problem with this is it outputs 5, instead of 5.5. How would I format it to include up to 2 decimals?

Apollo
  • 8,874
  • 32
  • 104
  • 192

1 Answers1

4
<string name="price_string">My string with price: %0.2f$s</string>`
rahul.ramanujam
  • 5,608
  • 7
  • 34
  • 56