percentage symbol in strings.xml percentage symbol in strings.xml xml xml

percentage symbol in strings.xml


Use

<?xml version="1.0" encoding="utf-8"?><resources>    <string name="teststring">The new value is %1$s%%</string></resources>

In java

String value = "25";String formattedString =    String.format(getResources().getString(R.string.teststring), value);Log.i("",formattedString);


Can you try \%% instead of % ??

Like,

<string name="teststring">The new value is \%%</string>

Or

<string formatted="false" name="teststring" >The new value is %</string>


Try this

<string  name="teststring"> The new value is %1$s %% </string>