复数字符串资源中文总是获得quantity为other的字符串

	
	    One unicorn
	    %d unicorns
	
String s = getResources().getQuantityString(R.plurals.unicornCount, 1, 1);
		Log.d(this.getClass().getName(), s);
		s = getResources().getQuantityString(R.plurals.unicornCount, 3, 3);
		Log.d(this.getClass().getName(), s);

因为中文没有复数语法,所以当语言是中文时,将总是获得quantity为other的字符串

Although historically called "quantity strings" (and still called that in API), quantity strings should only be used for plurals. It would be a mistake to use quantity strings to implement something like Gmail's "Inbox" versus "Inbox (12)" when there are unread messages, for example. It might seem convenient to use quantity strings instead of an "if" statement,but it's important to note that some languages (such as Chinese) don't make these grammatical distinctions at all, so you'll always get the "other" string.

你可能感兴趣的:(Android)