History log of /frameworks/base/core/tests/coretests/src/android/preference/ListPreferenceTest.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ba636df784398e4cd56f2982de63973ef6cd44fb 13-Jul-2010 Kenny Root <kroot@google.com> 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
/frameworks/base/core/tests/coretests/src/android/preference/ListPreferenceTest.java