Re: [android-developers] Modify strings.xml dynamically

2010-04-21 Thread Mark Murphy
raukodraug wrote:
 Hi everyone,
 
 I want to implement a Settings section in my application, and I want
 that when the user selects whatever, one of the strings from
 string.xml will change its value according to the user selection.
 Is this possible at all? any ideas on how to implement it?

You cannot modify strings.xml at runtime. That file, like all resources,
is part of your digitally-signed application.

You are welcome to create your own sort of wrapper mechanism, where you
look to see if the user has changed the value and use it instead of the
string resource, but there is nothing really in Android itself that
implements that pattern for you.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android Training in US: 14-18 June 2010: http://bignerdranch.com

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Modify strings.xml dynamically

2010-04-21 Thread ~ TreKing
On Wed, Apr 21, 2010 at 11:55 AM, raukodraug
gabriel.martine...@gmail.comwrote:

 I want to implement a Settings section in my application, and I want that
 when the user selects whatever, one of the strings from string.xml will
 change its value according to the user selection.


There's no reason to even try this - this is what the built-in preference
classes are for.

-
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en