Is it possible to have placeholders in string values in string.xml that can be assigned values at run time?
Example:
some string PLACEHOLDER1 some more string
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Formatting and Styling
Yes, see the following from String Resources: Formatting and Styling
Basic Usage
Note that
getStringhas an overload that uses the string as a format string:Plurals
If you need to handle plurals, use this:
The first
mailCountparam is used to decide which format to use (single or plural), the other params are your substitutions:See String Resources: Plurals for more details.