Created
October 2, 2017 07:00
-
-
Save Tarelochkin/3a3bd68c9e87330e44469a590740c074 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<plurals name="charge_notification_count"> | |
<item quantity="zero">Hydrate while charging reminder sent %d times</item> | |
<item quantity="one">Hydrate while charging reminder sent %d time</item> | |
<item quantity="other">Hydrate while charging reminder sent %d times</item> | |
</plurals> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int count = PreferenceUtilities.getChargingReminderCount(this); | |
//the first count parameter selects the appropriate plural string and the second count parameter is inserted into the %d placeholder. | |
String formattedChargingReminders = getResources().getQuantityString(R.plurals.charge_notification_count, count, count); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment