if i have setup as an array
<string-array name="Sex">
<item>Male</item>
<item>Female</item>
</string-array>
<string-array name="Sex_Values">
<item>m</item>
<item>f</item>
</string-array>
and i create a shared preference as
<ListPreference android:key="iama" android:title="I am a "
android:entries="@array/Sex" android:entryValues="@array/Sex_Values"/>
how can i have the title displayed for the entry as "I am a male"
public void onSharedPreferenceChanged(SharedPreferences
sharedPreferences,String key)
{
try
{
/* your code here */
if (key.equalsIgnoreCase("iama"))
lIma.setTitle("I am a " +
sharedPreferences.getString("iama","woman"));
--
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