Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit ba636df7 authored by Kenny Root's avatar Kenny Root
Browse files

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
parent 25940667
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment