0

I need help, How To Change String Resource Xml Values at new value? I have <string name="pref_way">/mnt/sdcard/</string> and change at new value in programming <string name="pref_way">/mnt/sdcard/ext_sd</string>

1
  • not possible to modify at run time Commented Aug 27, 2013 at 11:58

2 Answers 2

3

You can't modify any files in res dynamically during run time. They are read-only.

Instead for this kind of purpose I would recommend you to go for Shared Preference.

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

Comments

0

You can't change a String resource (or any other type of XML-declared resources) at runtime. Create a String variable in one of you classes that initializes with the resource String and you may change that at your will.

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.