Reputation: 9747
I was looking at the widget sample in the google api demos, and i found this line in the strings.xml
<string name="appwidget_text_format"><xliff:g id="prefix">%1$s</xliff:g></string>
and I don't understand what it's doing, I've never seen something like this, can someone please explain to me what's going on here.
I mean the whole, xliff:g and id, and especially the "%1$s". What's it doing?
Thanks very much
Upvotes: 0
Views: 99
Reputation: 190
You better refer how to use Formatter to get more understanding on "%1$s" part.
Upvotes: 1
Reputation: 23655
xliff
here is an additional namespace (should be specified in the xml header) and refers to the XML Localisation Interchange File Format.
The %1$s
is a placeholder for a value you can later set in your Activity using the getString(int resId, Object... arg) method.
Upvotes: 3