Allow ListPreference summary to use entry
Currently when ListPreferences are used in a PreferenceActivity, the summary values are set to the same as the current index in mEntryValue. This patch adds the ability for a string substitution to be used in the summary which points to the corresponding entry in mEntries to aid in localization. For example a preference may be named "color" with the following attributes in the locale "de" (German): mEntryValues = { "red", "green", "blue" } mEntries = { "rot", "grün", "blau" } mSummary = "Die Farbe ist %1$s." getSummary() returns "Die Farbe ist grün." Change-Id: Iea169ac3d1c9d6290d853fc7c67a7c4c8a11bb90
Loading
Please register or sign in to comment