Mark Murphy wrote:
> 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.

I think I figured it out. The actual strings are being used as the
text property of RadioButtons in a RadioGroup. I made a simple
activity with the following setup:

layout/main.xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >

    <RadioGroup
        android:id="@+id/rg_parts"
        android:orientation="horizontal"
        android:layout_width="fill_parent"
        android:layout_height="45dip"
        >
        <RadioButton
                android:id="@+id/btn_tenor"
                android:layout_height="wrap_content"
                android:layout_width="fill_parent"
                android:layout_weight="1"
                android:text="@string/hello"
                android:tag="1"
                />
    </RadioGroup>
</LinearLayout>

res/values/strings.xml:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="hello">Hello World, Portrait!</string>
    <string name="app_name">OrientationTest</string>
</resources>

res/values-land/strings.xml:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="hello">Hello World, Landscape!</string>
</resources>

In this case, changing the orientation does not update the string on
the RadioButton. Maybe this is a bug with RadioButton or RadioGroup? I
don't know, but I guess for now I'll just set all the values manually.

Thanks for your help!

-- 
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