I looked at several tutorials and all their listPreference dialogs look like this.
but my dialog looks like this
Any ideas why my dialog looks different? I reviewed the tutorials and my xml code looks the same as theirs.
Here is my pref_general.xml code.
<?xml version="1.0" encoding="utf-8"?>
<!-- NOTE: EditTextPreference accepts EditText attributes. -->
<!-- NOTE: EditTextPreference's summary should be set to its value by the activity code. -->
<EditTextPreference
android:key="@string/pref_location_key"
android:title="@string/pref_title_location"
android:defaultValue="@string/pref_location_default"
android:selectAllOnFocus="true"
android:inputType="text"
android:capitalize="words"
android:singleLine="true"
android:maxLines="1" />
<!-- NOTE: ListPreference's summary should be set to its value by the activity code. -->
<ListPreference
android:title="@string/pref_temperature_units_title"
android:key="@string/pref_temperature_units_key"
android:defaultValue="@string/pref_units_metric"
android:entryValues="@array/pref_temperature_unit_values"
android:entries="@array/pref_temperature_units"
/>
and part of the activity code
public class SettingsActivity extends PreferenceActivity
implements Preference.OnPreferenceChangeListener {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Add 'general' preferences, defined in the XML file
addPreferencesFromResource(R.xml.pref_general);
// For all preferences, attach an OnPreferenceChangeListener so the UI summary can be
// updated when the preference changes.
bindPreferenceSummaryToValue(findPreference(getString(R.string.pref_location_key)));
bindPreferenceSummaryToValue(findPreference(getString(R.string.pref_temperature_units_key)));
}