Skip to content

Instantly share code, notes, and snippets.

@omkar-tenkale
Created April 12, 2021 16:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save omkar-tenkale/e93b7f8c07f82529e14dd08e4442c087 to your computer and use it in GitHub Desktop.
Save omkar-tenkale/e93b7f8c07f82529e14dd08e4442c087 to your computer and use it in GitHub Desktop.
<!-- <string name="welcome_messages">Hello, %1$s! You have %2$d new messages.</string>-->
<!-- String text = res.getString(R.string.welcome_messages, username, mailCount);-->
<!-- <plurals name="welcome_messages">-->
<!-- <item quantity="one">Hello, %1$s! You have a new message.</item>-->
<!-- <item quantity="other">Hello, %1$s! You have %2$d new messages.</item>-->
<!-- </plurals>-->
<!-- String text = getResources().getQuantityString(R.plurals.welcome_messages, mailCount, username, mailCount);-->
<!-- %[parameter_index$][format_type]-->
<!-- %: The percent sign marks the beginning of the format specifier.-->
<!-- parameter index: This is a number followed by a dollar sign. If you had three parameters that you wanted to insert into the string, then they would be called 1$, 2$, and 3$. The order you place them in the resource string doesn't matter, only the order that you supply the parameters.-->
<!-- format type: There are a lot of ways that you can format things (see the documentation). Here are some common ones:-->
<!-- s string-->
<!-- d decimal integer-->
<!-- f floating point number-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment