Hi,
I am used to just using a choice format for doing something deciding
between "{0} thing" and "{0} things".

However Context and Resources have a lot of utitilities it seems for
dealing with String and loading them with native replacement. One
method of such is Resources.getQuantityText(int id, int quantity) ...
problem is the way to declare the string is not declared anywhere and
upon using this method I am greeted with

 android.content.res.Resources$NotFoundException: Plural resource ID
#0x7f080050 quantity=450 item=other


Looking at the source it does use a native method to load the
pluralized resource so I can't look at the code. Would anyone know how
to use this may-be pretty nifty utility?

I was thinking it might be something like:

<string name="thing_string" pluralrule="one">%1$d thing</string>
<string name="thing_string" pluralrule="other">%1$d things</string>

since they don't use the xml id element but I am just guessing and am
completely stumped.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to