Answer the question
In order to leave comments, you need to log in
What is the best way to update the summary of a modified EditTextPreference with the SimpleSummaryProvider set?
I have a modified EditTextPreference (with a modified EditTextPreferenceDialogFragmentCompat ) that uses the SimpleSummaryProvider :
<NumberPreference
android:key="pref_key"
android:defaultValue="0"
android:title="Some title"
app:useSimpleSummaryProvider="true"/>
Answer the question
In order to leave comments, you need to log in
I looked at the Android sources ( EditTextPreferenceDialogFragmentCompat.java ) - how the settings change dialog notifies the EditTextPreference about a value change. I did the same and it worked :)
if (editTextPreference().callChangeListener(value)) {
editTextPreference().setText(value);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question