Methods Summary |
---|
final int | attrForNumber(int n)
return PluralRules.attrForQuantity(quantityForNumber(n));
|
static final int | attrForQuantity(int quantity)
// see include/utils/ResourceTypes.h
switch (quantity) {
case QUANTITY_ZERO: return 0x01000005;
case QUANTITY_ONE: return 0x01000006;
case QUANTITY_TWO: return 0x01000007;
case QUANTITY_FEW: return 0x01000008;
case QUANTITY_MANY: return 0x01000009;
default: return ID_OTHER;
}
|
abstract int | quantityForNumber(int n)
|
static final android.content.res.PluralRules | ruleForLocale(java.util.Locale locale)
String lang = locale.getLanguage();
if ("cs".equals(lang)) {
if (cs == null) cs = new cs();
return cs;
}
else {
if (en == null) en = new en();
return en;
}
|
static final java.lang.String | stringForQuantity(int quantity)
switch (quantity) {
case QUANTITY_ZERO:
return "zero";
case QUANTITY_ONE:
return "one";
case QUANTITY_TWO:
return "two";
case QUANTITY_FEW:
return "few";
case QUANTITY_MANY:
return "many";
default:
return "other";
}
|