Loading docs/html/guide/topics/resources/string-resource.jd +4 −5 Original line number Diff line number Diff line Loading @@ -364,11 +364,10 @@ getQuantityString}(R.plurals.numberOfSongsAvailable, count, count); <p>When using the {@link android.content.res.Resources#getQuantityString(int,int,int) getQuantityString()} method, you need to pass the {@code count} twice if your string includes <a href="#FormattingAndStyling">string formatting</a> with a number. For example, for the string {@code %d songs found}, the first {@count} parameter selects the appropriate plural string and the second {@count} parameter is inserted into the {@code %d} placeholder. If your plural strings do not include string formatting, you don't need to pass the third parameter to {@link android.content.res.Resources#getQuantityString(int,int) getQuantityString}.</p> {@code %d songs found}, the first {@code count} parameter selects the appropriate plural string and the second {@code count} parameter is inserted into the {@code %d} placeholder. If your plural strings do not include string formatting, you don't need to pass the third parameter to {@link android.content.res.Resources#getQuantityString(int,int) getQuantityString}.</p> </dd> <!-- end example --> </dl> Loading Loading
docs/html/guide/topics/resources/string-resource.jd +4 −5 Original line number Diff line number Diff line Loading @@ -364,11 +364,10 @@ getQuantityString}(R.plurals.numberOfSongsAvailable, count, count); <p>When using the {@link android.content.res.Resources#getQuantityString(int,int,int) getQuantityString()} method, you need to pass the {@code count} twice if your string includes <a href="#FormattingAndStyling">string formatting</a> with a number. For example, for the string {@code %d songs found}, the first {@count} parameter selects the appropriate plural string and the second {@count} parameter is inserted into the {@code %d} placeholder. If your plural strings do not include string formatting, you don't need to pass the third parameter to {@link android.content.res.Resources#getQuantityString(int,int) getQuantityString}.</p> {@code %d songs found}, the first {@code count} parameter selects the appropriate plural string and the second {@code count} parameter is inserted into the {@code %d} placeholder. If your plural strings do not include string formatting, you don't need to pass the third parameter to {@link android.content.res.Resources#getQuantityString(int,int) getQuantityString}.</p> </dd> <!-- end example --> </dl> Loading