Im using strings with placeholder in my strings.xml
<string name="date">%1$d.%2$d.%3$d</string>
And set it in the code like:
String.format(context.getResources().getString(R.string.date), day, month, year);
If we take the 5th may for example the result now is:
5.5.2015
How can i add the leading zero for numbers smaler than ten to the string resources?
Not a duplicate of Left padding a String with Zeros since the solution of this question is:
String.format("%010d", Integer.parseInt(mystring));
But the format for the android resource string is:
%1$d
where the 1
indicates the index. Where should i put the 02
?