Mike Olson wrote:
> Mark Murphy wrote:
>> Are you sure you have the right names for your resource directories?
>> Assuming res/values/ is your portrait one, are you using
>> res/values-land/ for the landscape strings?
> 
> I've done it two ways. The first way I have three directories:
> 
> res/values
> res/values-land
> res/values-port
> 
> res/values has things that don't need to change, and the other two
> have ones unique to those orientations.
> 
> In the other version I have
> res/values
> res/values-land
> 
> res/values has ones that apply to both AND ones that only apply to
> portrait. res/values-land/ has the strings that should override the
> portrait ones. In both cases I see the same behavior: when I change
> orientations everything uses the strings from the orientation the
> activity first started with.

That's pretty odd. I am not aware of any particular problems here. In
fact, I just hacked in res/values-land/strings.xml in one of my book
samples, and it works as expected.

If you can create a sample project that reproduces your problem, post it
somewhere. Or, grab:

http://github.com/commonsguy/cw-android/tree/master/Resources/Strings/

and add res/values-land/strings.xml with:

<?xml version="1.0" encoding="utf-8"?>
<resources>
        <string name="btn_name">LAND:</string>
</resources>

When I build and load that in a 2.1 emulator, the resource value changes
as expected.

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

_The Busy Coder's Guide to Android Development_ Version 3.0
Available!

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

Reply via email to