Merge "Revert "Revert "Replace dynamic summary text for SettingPref""" into oc-dev am: ae0886c9f7

am: 934a04509f

Change-Id: Iff239e99df07cf425f650fbdb9cfb72a3fc40182
This commit is contained in:
Matthew Fritze
2017-05-24 17:18:58 +00:00
committed by android-build-merger
5 changed files with 83 additions and 4 deletions

View File

@@ -121,6 +121,19 @@ public class SettingPref {
if (mTwoState != null) {
mTwoState.setChecked(val != 0);
} else if (mDropDown != null) {
if (mValues != null) {
int index = 0;
for (int len = mValues.length; index < len; index++) {
if (mValues[index] == val) {
break;
}
}
if (index < mValues.length) {
CharSequence entry = mDropDown.getEntries()[index];
mDropDown.setSummary(entry);
}
}
mDropDown.setValue(Integer.toString(val));
}
}