3

I have a string defined in my String.xml file that uses format arguments, i.e.:

<string name="myStr">Part No.(Part Sr. No.)</string>

I have assign string for TextView

<TextView android:text="@string/myStr"/>

There is error occurred for assign string value for TextView. How is it do format string for TextView?? Please help me.

Thanks! Nitin

6
  • have you tried clean the project and found the same issue? Commented Oct 15, 2013 at 11:32
  • 3
    Typically, when one posts "I'm trying to do something but I'm given some error instead", they must post the actual error before anyone can help them. Commented Oct 15, 2013 at 11:32
  • 1
    Please post the error. Commented Oct 15, 2013 at 11:36
  • First change String.xml to string.xml :-p ... 2nd What is the error ?? Commented Oct 15, 2013 at 11:39
  • XML formatted error for string.xml Commented Oct 15, 2013 at 11:44

1 Answer 1

2

To allow for all characters in your string, you must mark is as not formatted:

<string name="myStr" formatted="false">Part No.(Part Sr. No.)</string>
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.