1

Is it possible to reference an xml integer resource, inside a string resource?

For example: I'm storing a regular expression as a string resource, but I need to include integer values in my regular expression, and these integer values are already stored as integer resources.

1 Answer 1

1

Check this documentation: http://developer.android.com/guide/topics/resources/string-resource.html

One way to achieve what you want is using %d in your string and substitute it with the value of another integer resource in code -- see the section Quantity Strings (Plurals) on the site for an example.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.